View Single Post
Old 10-11-2007, 09:32 AM   #4 (permalink)
sde
Moderator
 
sde's Avatar
 
Join Date: May 2002
Location: us.ca
Posts: 4,489
sde is on a distinguished road
i'm confused, before your example you want to store the hex result in an array, but your example shows you storing the result in a string.

here's how you would store the result in a string.
PHP Code:
<?php
$result 
'';
$string "32451";
$numbers = array('1','2','3','4','5'); // array1 - stores numbers 1-5

foreach ($numbers as $each) {
  if (
strstr($string$each)) {
    
$result .= dechex($each);
  }
}
?>
__________________
Mike
sde is offline   Reply With Quote