Unstoppable Domains

Strings

Spacemail by SpaceshipSpacemail by Spaceship
Watch

Mike_Wiseman

Established Member
Impact
3
[resolved] Strings

Ok i am trying to add bbcode into one of my pages and here is where im having trouble:
Code:
$string = "text"

I want "Text" to echo the users quote in the database:

Code:
$string = "$fetch->quote"

But i get a Parse Error
 
Last edited:
0
•••
The views expressed on this page by users and staff are their own, not those of NamePros.
AfternicAfternic
Try This:
PHP:
$string = $fetch->quote;
 
0
•••
i did that but then i have this error:
Parse error: syntax error, unexpected '=' in /home/mafiamay/public_html/a/profile.php on line 105

line 105:
Code:
	$bb-replace = array('[b]','[/b]','[i]','[/i]');
 
0
•••
Mike_Wiseman said:
i did that but then i have this error:
Parse error: syntax error, unexpected '=' in /home/mafiamay/public_html/a/profile.php on line 105

line 105:
Code:
	$bb-replace = array('[b]','[/b]','[i]','[/i]');
PHP:
$bb->replace = array('','','','');
 
0
•••
nvm problem fixed.
i just had to echo the $string
 
0
•••
Also, if you are going to use a class function inside of double quotation marks, you need to enclose it in brackets.

Example:
PHP:
<?php echo "{$fetch->quote}"; ?>
(Yes, I know it's dumb to do it this way if you are only going to echo the one function/variable. It's an example. ;))



:gl:
 
0
•••
Dynadot — .com Registration $8.99Dynadot — .com Registration $8.99

We're social

Unstoppable Domains
Domain Recover
DomainEasy — Payment Flexibility
  • The sidebar remains visible by scrolling at a speed relative to the page’s height.
Back