php - Count how many char in array numbers -


i've array got preg_match_all. array contain 4 values , each value number. want display value have 10 or more character. example:

array_value1 = 1234567890 array_value2 = 01234 array_value3 = 449125 array_value4 = 991234581210 

i want show echo array_value1 , array_value4 because formed of 10 or more characters! how can it?

i tried count_char or str_len see message "array string conversion".

anyone can me?

first of have put values inside array:

$array = array(1234567890, 01234, 449125, 991234581210); 

after can use simple foreach:

foreach($array $value) {  if(strlen((string)$value) >= 10)  echo $value; } 

you should add separator after each echo, or have output like

1234567890991234581210 

Comments

Popular posts from this blog

android - Get AccessToken using signpost OAuth without opening a browser (Two legged Oauth) -

org.mockito.exceptions.misusing.InvalidUseOfMatchersException: mockito -

google shop client API returns 400 bad request error while adding an item -