Hello,
I currently have two arrays:
- Holding numbers 1-5
- Holding hex values for the 5 numbers
How do I the string for occurrences of the numbers found inside the 1st array, and upon one being found, how do I store the hex values inside the $result variable?
Code:
$string = "32451";
$numbers = array('1','2','3','4','5'); // array1 - stores numbers 1-5
$hex = array('41','42','43','44','45'); // array2 - stores numbers hex values
echo $result;
Example: Using the code above as an example, the result variable should eventually hold the following: "4342444541"