Search code examples
phpforeach

Foreach for an array


I have an array:

array(3) {
    [0]=>  string(1) "3"
    [1]=>  string(3) "488"
    [2]=>  string(3) "177"
}

I want to have a foreach for its values, which returns the number in the array. How can I do that?


Solution

  • By numbers do you mean the strings?

    var_dump(array_values($your_array));