Wednesday, September 3, 2008

Substring function in php

<?php
header ('Content-type: text/html; charset=utf-8');
echo $haystack = 'Iñtërnâtiônàlizætiøn';
 
$substr = substr($haystack, 0, 13); // Position 13 is in the middle of the ô char
 
print "Substr: $substr<br>";
?>

No comments:

Post a Comment