niche Posted November 22, 2011 Share Posted November 22, 2011 I'm sure this is an escaping quotes problem, but I just can't figure it out. What should I do that I'm not doing? I need "1" to be displayed: <?php$var = "word1" . '<br />' . "word2";echo substr_count($var,". '<br />' .");?> Link to comment Share on other sites More sharing options...
Ingolme Posted November 22, 2011 Share Posted November 22, 2011 Those quotes don't exists in your PHP string. Look at your string for a moment. Link to comment Share on other sites More sharing options...
justsomeguy Posted November 22, 2011 Share Posted November 22, 2011 You're searching for dots inside the string, which aren't there. The variable $var is set to "word1<br />word2", there aren't any dots, spaces, or single quotes inside it. Link to comment Share on other sites More sharing options...
niche Posted November 22, 2011 Author Share Posted November 22, 2011 Thanks ingolme and justsomeguy. Asking this question was a humbling experience. Thanks for your help. Niche Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.