You can as well use the foreach statement to get the content of an array out.. you use that when you need to perform something to every single one of the array element…
$someArr = array(1,2,3,4,5…)
foreach ($someArr as $newVar){
$newVar*=9;
//whatever you need to do to array members
echo $newVar;
}
Hi iam trying to use this code with an animated login and register form. the form works fine. as soon as i put the php err code the whole form looses its css and freezes. please check code here http://codepen.io/anon/pen/PZKBpW
there is one problem though . i want my err mesg with a border. if i show border on css then the form displays the border of the div even if there is no err. basically i want the div there as empty and if the submit has errors then the err show and outline with a border. any help there pleae
Seriously? This is terrible lol.
He wanted that $1 so much. :’)
lmao!!!!!!!!!!!!!!!!!!!!!!!!! this is funny
lollllll
so, an attempt to correct this users coding..
input:
output:
woops, the echo tags have a ‘pre’ tag in them.
haha this is too basic for a snippet
Or this:
echo '<pre>',print_r($array,1),'<pre>';
For beginners:
The reason we use a comma instead of a period/dot between the ‘pre’ and the print_r() is because print_r() does an echo from itself.
If you would use a dot instead then it PHP will echo print_r() and AFTER that a pre and a /pre.
—
Gringer
PS:
As we can read here:
http://nl3.php.net/manual/function.print-r.php
print_r() takes a second argument to return instead of echo:
Note: We use dots instead of comma’s, and give print_r() an extra ‘true’ (= return).
Not as short, but just to explain to beginners how the spoon fits in the fork xD
I’m sorry to say that not everybody is experienced who come here.It is a wonderful resource for the all levels of coder. Keep it up Chris.. Thanks
Gringer. I agree with you. Thanks.
You can as well use the foreach statement to get the content of an array out.. you use that when you need to perform something to every single one of the array element…
$someArr = array(1,2,3,4,5…)
foreach ($someArr as $newVar){
$newVar*=9;
//whatever you need to do to array members
echo $newVar;
}
Hi iam trying to use this code with an animated login and register form. the form works fine. as soon as i put the php err code the whole form looses its css and freezes. please check code here http://codepen.io/anon/pen/PZKBpW
thanks your help will be appreciated
hi sorted.
check the solution here http://codepen.io/anon/pen/XXemJB
there is one problem though . i want my err mesg with a border. if i show border on css then the form displays the border of the div even if there is no err. basically i want the div there as empty and if the submit has errors then the err show and outline with a border. any help there pleae