How do I hide results in a PHP array?

  • Thread starter Thread starter craig c
  • Start date Start date
C

craig c

Guest
I have an array thats producing the following result:

Array ( [0] => Calls: 0 [1] => 0 )

How do I ONLY display the 0 after Calls: and hide the rest of the result?
Here is the coding producing the array:

preg_match_all('/Calls: (\d+)/', $queueinfo, $q_waitingcalls, PREG_SET_ORDER );
 
producing the following results when you do a var_dump right?
well, I understand that under the index 0 , stays the string "Calls: 0"
So you can't modify the var_dump result!!! as that is a function that has a clear result.
you can either create a new function and use it instead of bar_dump
you can either set the array[0] = 0;
please edit your post and explain what you're trying to achieve, and I'll answer you back.
Here is the coding producing the array:

preg_match_all('/Calls: (\d+)/', $queueinfo, $q_waitingcalls, PREG_SET_ORDER );

you can simply use

preg_match_all('/(\d+)/', $queueinfo, $q_waitingcalls, PREG_SET_ORDER );
 
Back
Top