Support Forums
PHP Beginners guide - Printable Version

+- Support Forums (https://www.supportforums.net)
+-- Forum: Categories (https://www.supportforums.net/forumdisplay.php?fid=87)
+--- Forum: Coding Support Forums (https://www.supportforums.net/forumdisplay.php?fid=18)
+---- Forum: PHP The Hypertext Preprocessor (https://www.supportforums.net/forumdisplay.php?fid=21)
+---- Thread: PHP Beginners guide (/showthread.php?tid=1609)

Pages: 1 2 3 4 5


RE: PHP Beginners guide - Spl3en - 10-16-2009

Excellent tutorial for begginers Smile !
I just would like to add something about print and echo :
The biggest difference between them is the return value ; print can return true or false, whereas echo doesnt return anything.
However, echo is faster to execute than print. But it's only in theory, in practice, there is no difference Tongue

Thanks for this tut!


RE: PHP Beginners guide - Gaijin - 10-16-2009

(10-16-2009, 08:34 AM)Spl3en Wrote: Excellent tutorial for begginers Smile !
I just would like to add something about print and echo :
The biggest difference between them is the return value ; print can return true or false, whereas echo doesnt return anything.
However, echo is faster to execute than print. But it's only in theory, in practice, there is no difference Tongue

Thanks for this tut!

Hey man Thanks! I forgot about the return.
And there is also in practice a time difference but even over 2000 prints it's not noticeable.
I've added your post to the first post. Thanks again.


RE: PHP Beginners guide - Spl3en - 10-16-2009

You're welcome Smile !
You're right, i havn't ever noticed the speed difference between both, but this is the theory... maybe just a legend Tongue
As we are talking about improvements about this tutorial, you should maybe develop explicitly about $_SESSION variable, even if it's not in "begginner" leve... Maybe not explain all about this, but make more descriptive about that... Just a suggestion ^^
Keep up the good work Smile


RE: PHP Beginners guide - Gaijin - 10-16-2009

Thank you for your ideas!
I will look to put that in there too.


RE: PHP Beginners guide - steelprime - 10-17-2009

funtion print i() ?? shouldn't it be function??


RE: PHP Beginners guide - Gaijin - 10-18-2009

(10-17-2009, 10:54 PM)steelprime Wrote: funtion print i() ?? shouldn't it be function??

No, the function you mean is print_r() used to output all members of an array.


RE: PHP Beginners guide - yow gee - 10-18-2009

thanks man relly good teacher for i wihle i was searching for a nice tut in php for noobs really helped me


RE: PHP Beginners guide - steelprime - 10-18-2009

(10-18-2009, 04:35 AM)NinjaGeek Wrote: No, the function you mean is print_r() used to output all members of an array.

i mean you had a typing error.....

Quote:<?php

// declare global variable
$i = 5;

funtion print_i() {
global $i;

print $i;
}

?>

funtion print_i() ?? shouldn't it be function print_i() ?? because i tried it in my phpdesigner and an error appeared


RE: PHP Beginners guide - Spl3en - 10-19-2009

Yeah, it's not funtion, it's function of course Smile
Thanks for report it, NinjaGeek will surelly correct it ^^


RE: PHP Beginners guide - Gaijin - 10-19-2009

(10-18-2009, 10:02 PM)steelprime Wrote: i mean you had a typing error.....
funtion print_i() ?? shouldn't it be function print_i() ?? because i tried it in my phpdesigner and an error appeared
(10-19-2009, 01:38 PM)Spl3en Wrote: Yeah, it's not funtion, it's function of course Smile
Thanks for report it, NinjaGeek will surelly correct it ^^

ahhhh..... yeah... crap....
Yes it's function, but I can't edit my post anymore now so I'll gonna see if a mod can do it.

Thanks!