Forum Moderators: coopster
What I want is that if that array has less than 5 elements, then it should add the number of elements required to make it 5, and the value of those elements should be 0.
Please help me.
$arr = array(1,2);$arr = [url=http://www.php.net/array-pad]array_pad[/url]($arr, 5, 0);echo '<pre>';print_r($arr);echo '</pre>';
Should do it :)
Is it possible to determine if a particular word exists in a string? I have this :
$start_indicate = 'Capital';
I want that if the word 'Capital' does not exist, $start_indicate to become Liabilities
dc
I saw it on php.net after posting ;)