is there any short method to obtain value of array in php
Posted
by liysd
on Stack Overflow
See other posts from Stack Overflow
or by liysd
Published on 2010-05-11T10:28:11Z
Indexed on
2010/05/11
10:34 UTC
Read the original article
Hit count: 235
When I obtain a field 'text' of an array I have to do something like this:
$text = isset($tab['text'][0])?$tab['text'][0]:"";
is there any function that returns value when element $tab['text']
exists and ""
when not and of course doesn't produce notice in latter case.
© Stack Overflow or respective owner