Thread Rating:
  • 1 Vote(s) - 5 Average
  • 1
  • 2
  • 3
  • 4
  • 5
PHP Beginners guide
#11
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!
Reply
#12
(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.
Reply
#13
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
Reply
#14
Thank you for your ideas!
I will look to put that in there too.
Reply
#15
funtion print i() ?? shouldn't it be function??
Reply
#16
(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.
Reply
#17
thanks man relly good teacher for i wihle i was searching for a nice tut in php for noobs really helped me
Reply
#18
(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
Reply
#19
Yeah, it's not funtion, it's function of course Smile
Thanks for report it, NinjaGeek will surelly correct it ^^
Reply
#20
(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!
Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  PHP Framework List: An Ultimate Guide to 102 PHP Frameworks for Web Developers tk-hassan 0 936 07-27-2020, 11:26 PM
Last Post: tk-hassan
  PHP Video Tutorials (PHP For Beginners) Eleqtriq 4 3,660 10-10-2011, 01:00 PM
Last Post: Greyersting
  [Guide]The Absolute Bare Foundations Of PHP[Free] Poppins 6 1,514 12-14-2010, 05:53 PM
Last Post: Buzz Lightyear
  PHP OOP guide Gaijin 4 2,026 11-10-2009, 11:38 AM
Last Post: Gaijin

Forum Jump:


Users browsing this thread: 5 Guest(s)