SHARE
TWEET

Quotation mark conversion: vertical to curly

a guest Jun 5th, 2011 279 Never
  1. <?php
  2. function doitwell($text)
  3. {
  4. $original=array(' "', '" ');
  5. $replaced=array(' “', '” ');
  6. return str_replace($original,$replaced,$text);
  7. }
  8.  
  9. $tryitnow = doitwell('We "see" if "it" works or not');
  10. echo $tryitnow;
  11. ?>
RAW Paste Data
Top