I want to create an array with some text. Let's say the following:

$sometext = array(explode(" ", "Objective: Position as a Machine Attendant
and or Operator Summary - Over 16 years experience in packaging and
maintenance of various operating machinery. - 13 years experience in cutting
steel and operating a steel press. - Part time experience in packaging and
shipping bread for a bakery."));

I can easily return that text using:

print_r($sometext);

However I want loop through that text for to bold certain words in the
array. In any event I've tried using the following but it only returns
"sometext at[0] is: [Array]" which is not want I want, I want it to show me
each word in the array through the loop. Any ideas what I am doing wrong?

$arrayLength = count($sometext);

for ($i = 0; $i < $arrayLength; $i++){
   echo "sometext at[" . $i . "] is: [" .$sometext[$i] . "]<br>\n";
}

Thanks

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to