Good day to all.

I tried the following code from PHP's manual

 if (isset($submit))
 {
  if ($submit == "Save")
  {
  echo "$im_file<BR>";
  $tok = strtok($im_file, "\\");
  while ($tok)
  {
  echo "$tok<BR>";
  $tok = strtok ("\\");
  }
  }
 }

I have the string $im_file ="C:\\<a_path>\\image.jpg" and I want to have
into a variable (say it $im) just the filename part (image.jpg).
The code above, returns me just a "C:" :((

Any suggestions greatly appreciated.


-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]

Reply via email to