zephyrstudios Posted February 27, 2007 Share Posted February 27, 2007 Hello all, I am trying to place some html tags within my php script. When I do-I wrap with a <p> tag</p> , but then I am unable to validate the script. I have tried the tags outside the php and in the php and can't figure it out. Any help is appreciated. Here is the script: <?php // Script 5.0000 - age.php $string_story= "In the matter of prolonging human life, science has played no part whatever. Take the case history of one Bessie Singletree. At the early age of five, Bessie suddenly became six and entered school. On trolley cars her age remained at six until she was nine. When she was 11 years old, she was 12, and for the benefit of movies and railroads, she was 12 until she was 15. On her 27th birthday Miss Singletree became 24. At 40 she was 39 and remained so until she was close to 50. At 50 Bessie was 40; at 60, 55. On her 70th birthday everyone said Grandmother Singletree was pretty chipper for an octogenarian. At 75 she had her picture in the paper as the oldest woman in the county, aged 93. Ten years later she passed away at the ripe old age of 109.<br />"; $sub="At the early age of five, Bessie suddenly became six and entered school. On trolley cars her age remained at six until she was nine. When she was 11 years old, she was 12, and for the benefit of movies and railroads, she was 12 until she was 15. On her 27th birthday Miss Singletree became 24. At 40 she was 39 and remained so until she was close to 50. At 50 Bessie was 40; at 60, 55.<br />"; print ("$string_story <br />"); print strlen ("$string_story <br />" );//print length of string print (" <br /> $sub <br />");//print substring print str_word_count ("<br /> $sub <br />");//print length of substring print $sub=ucwords ("<br />$sub <br />");//print string with capitol letters print $sub=strpos ("she", $sub); print $sub=str_replace ('She', 'she', $sub); print $sub=str_replace ('Was', 'was', $sub); ?> </p> In future please use the code ( ) tags when including code in posts. Thank you - wildteen88 Quote Link to comment Share on other sites More sharing options...
btherl Posted February 27, 2007 Share Posted February 27, 2007 What error do you get when you try to validate? Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.