PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!
tags where appropriate when posting code. Read: [url=http://forums.devnetwork.net/viewtopic.php?t=21171]Posting Code in the Forums[/url][/color]
can someone please tell me the error in the following code?
Parse error: parse error, unexpected T_STRING, expecting ',' or ';'
PHPNERD wrote:Thank you I was forgetting all about my \'s
You could use echo '<a href="link..... instead of \ing all of your standard quotation marks. Basically, using ' instead of " for setting off the php line.
PHPNERD wrote:Thank you I was forgetting all about my \'s
You could use echo '<a href="link..... instead of \ing all of your standard quotation marks. Basically, using ' instead of " for setting off the php line.
He wouldn't be able to because he's evaluating $variables inside the string. unless he concatenated them like 'this is a '.$variable.' right here'; which would be more confusing than just escaping the " with \.
Just remember a string with double quotes is everything between " and "
So if you have a " in there but you don't want it to end the string, escape it with a \, and you're all good
Set Search Time - A google chrome extension. When you search only results from the past year (or set time period) are displayed. Helps tremendously when using new technologies to avoid outdated results.
PHPNERD wrote:Thank you I was forgetting all about my \'s
You could use echo '<a href="link..... instead of \ing all of your standard quotation marks. Basically, using ' instead of " for setting off the php line.
For the link he was echo'ing, this would need escaping also because of the calls to JavaScript functions. Regardless of the type of quote he used, they would need to be escaped.