Sun Oct 26, 2008 10:16 pm
<html>
<head>
<title>Dividing a string into tokens with strtok()</title>
</head>
<body>
<?php
$test = "http://www.codemiles.com/qs.xp?OP=dnquery.xp&ST=MS&DBS=2&QRY=developer+php";
$delims = "?&";
$word = strtok( $test, $delims );
while ( is_string( $word ) ) {
if ( $word ){
print "$word<br>";
}
$word = strtok( $delims);
}
?>
</body>
</html>
Codemiles.com is a participant in the Amazon Services LLC Associates Program, an affiliate advertising program designed to provide a means for sites to earn advertising fees by advertising and linking to Amazon.com
Powered by phpBB © phpBB Group.