Hi DP's, I need help with this line of code $data[1]["Category"]["body"] = str_replace("[!LOCATION!]", $data[2]["Location"]["name"], " ".$data[1]["Category"]["name"]." text text text ".$data[1]["Category"]["name"]." text text text"); I want to add <href link to this line of code (where the "text" words are),so it shoud look something like this: $data[1]["Category"]["body"] = str_replace("[!LOCATION!]", $data[2]["Location"]["name"], " ".$data[1]["Category"]["name"]." text text <a href="http://www.example.com/">Home</a>text ".$data[1]["Category"]["name"]." text text text"); But when i add the link,my site collapse Can you please help me with that?
$data[1]["Category"]["body"] = str_replace("[!LOCATION!]", $data[2]["Location"]["name"], " ".$data[1]["Category"]["name"]." text text <a href=\"http://www.example.com/\">Home</a>text ".$data[1]["Category"]["name"]." text text text"); PHP: What a mess, lol. Anyway, the reason why it won't work is because you weren't escaping the " characters. "text text <a href=\"http://xxx.com/\">..." Code (markup): As you weren't doing so, the interpreter was assuming that the string was ending on the first " after the href and therefore would throw an invalid syntax error.
thanks so much proactiv3 I love internet just because of people like you.You helping people for free just because you are great person. I'm seo expert,so if you need any help or advice on seo,be my guest - i will be glad to help thanks one more time