Question
PHP String Replace
I am looking to add my date to the beginning of my articles.
Previously, I
was using the string replace function to look for the begininng of my
paragraph and then place the date in front of that. Bad Jon! I forgot that
any article with multiple paragraphs would then have multiple dates.
$artContent = str_replace('<p>', '<p> '.$artDateEdited.' - ',
$artContent);
So, what I am looking for is how do I do a string replaceon just the first
paragraph?
--
TIA,
Jon Parkhurst
PriivaWeb
http://priiva.net.
was using the string replace function to look for the begininng of my
paragraph and then place the date in front of that. Bad Jon! I forgot that
any article with multiple paragraphs would then have multiple dates.
$artContent = str_replace('<p>', '<p> '.$artDateEdited.' - ',
$artContent);
So, what I am looking for is how do I do a string replaceon just the first
paragraph?
--
TIA,
Jon Parkhurst
PriivaWeb
http://priiva.net.
