while() and newline (\n), how does it make sense?
-
echo "300-600|Bad Karma 200 400|Rose";
It doesn’t help. I wants to check if the string has a newline. `$activities_label=strstr($activities_label, strpos($activities_label,”PHP_EOL”));
echo $activities_label;` But doesn’t match. Here is an example:$activities_label = get_post_meta(get_the_ID(), "activities_label", true); ... while($query->have_posts()) : ... if (false !== strpos($activities_label, '\n') && false !== strpos($activities_label, PHP_EOL)) echo $activities_label; endwhile;
Newbie.
//view
Bad Karma
300-600|Bad Karma
200
400|RoseBlue Elephant
300-600|Bad Karma
200
400|RoseRose
300-600|Bad Karma
200
400|RoseBut I wouldn’t have:
Bad Karma
300-600|Bad KarmaBlue Elephant
200Rose
400|Rose
Viewing 12 replies - 1 through 12 (of 12 total)
Viewing 12 replies - 1 through 12 (of 12 total)
- The topic ‘while() and newline (\n), how does it make sense?’ is closed to new replies.