How to take value only from array php?

nitramllerraf

New member
I've populated an array with values but when I print the array I get both the key and the value. I have searched the array functions but cannot seem to find a function that allows me to print out just the value. Does one exist?
 
for instance if your array variable is say, $array

do this

foreach ($array as $k=>$v){ // In this step you break the array ($array) into its keys ($k) and their corresponding values ($v)

echo $v; // in this step you loop over every key - value pair in the array and print only the values but no keys

} // end looping;

Hope this helps
 
Back
Top