anthonydamasco Posted June 6, 2008 Share Posted June 6, 2008 Alright Simple problem. I am storing measurements in a database (feet/inches) so here is the issue. database field "measure" = 2' 9" $dem = $my_row['measure']; echo $dem; Result: 2' 9 how do i echo the string with the quotes at the end? Link to comment https://forums.phpfreaks.com/topic/108987-solved-echoing-a-string-with-quotes-in-it/ Share on other sites More sharing options...
jonsjava Posted June 6, 2008 Share Posted June 6, 2008 <?php $dem = $my_row['measure']; $dem = str_replace("\"", "„", $dem); echo $dem; ?> Link to comment https://forums.phpfreaks.com/topic/108987-solved-echoing-a-string-with-quotes-in-it/#findComment-559111 Share on other sites More sharing options...
anthonydamasco Posted June 6, 2008 Author Share Posted June 6, 2008 hey, that gave me this result 13' 2„ Link to comment https://forums.phpfreaks.com/topic/108987-solved-echoing-a-string-with-quotes-in-it/#findComment-559113 Share on other sites More sharing options...
saint959 Posted June 6, 2008 Share Posted June 6, 2008 <?php $dem = $my_row['measure']; $dem = str_replace("\"", """, $dem); echo $dem; ?> think that may work Link to comment https://forums.phpfreaks.com/topic/108987-solved-echoing-a-string-with-quotes-in-it/#findComment-559118 Share on other sites More sharing options...
jonsjava Posted June 6, 2008 Share Posted June 6, 2008 oops, wrong relace..hehe. Link to comment https://forums.phpfreaks.com/topic/108987-solved-echoing-a-string-with-quotes-in-it/#findComment-559121 Share on other sites More sharing options...
anthonydamasco Posted June 6, 2008 Author Share Posted June 6, 2008 You guys rock! Thanks - worked, headache is finally going away Link to comment https://forums.phpfreaks.com/topic/108987-solved-echoing-a-string-with-quotes-in-it/#findComment-559124 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.