Question:
I'm learning PHP and little bit confused. Please help me?
anonymous
2012-08-07 09:40:35 UTC
Sir, I'm learning PHP from W3schools.com. I understand it. there's no problem but my confusion is what's the professional use of PHP or what's the way of using PHP?
Eg. I've learnt Arrays today but how to use it in webpage?
Kindly help me or suggest me a site that can help me. sorry if my question seems typical.
Thanks.
Four answers:
anonymous
2012-08-07 10:00:04 UTC
You do not have to use everything that you learn in PHP on a website, only use what you need.



I use PHP quite a bit in designing my sites... During the layout process I divide the site in to different sections to do a basic layout/template consisting of one or more of the following: a header, a top menu, a left menu, the main body area, and a footer. Then when I have each section done, I create my template something like this:










require_once('dbconnect.php'); // database connection

require_once('header.php');

require_once('topmenu.php');

require_once('leftmenu.php');

?>
















require_once('footer.php');

?>







Now that is a very simplified template example. So if I want to make changes to any part of the site, and keep from editing many pages, I just change the appropriate section. Now I do use PHP for many other things like e-mail forms and using database info, but the above example showing one way for using PHP. On some of my e-commerce sites I use one form to display individual product with it info by passing/requesting the information, saving me literally thousand of individual pages to display each listing.



If you do not have a use for arrays at this point in time, do not worry about it, if and when the time comes that you need to use one, you will be ready. I have used arrays before, but no good example comes to mind at this time.



Best wishes
anonymous
2012-08-07 09:44:45 UTC
The use of PHP is mainly for accounts/getting information from databases. You can query databases using PHP and SQL and it returns an array of values. You can also send email and use cookies from PHP.
carnet
2016-10-04 09:09:42 UTC
One of my favourite authors is Jack Kornfield, a Buddhist trainer from Northern California. He does a quality activity educating Buddhism is some way that is sensible to Americans/Westerners. I might strongly propose his ebook A Path With Heart as a well establishing factor for your travel. All the high-quality. Edit: a different extraordinary creator is Thich Nhat Hahn. He has written many extraordinary books. Here is a quote from him: “The so much worthy reward we will be able to present others is our presence. When mindfulness embraces the ones we like, they'll bloom like flora.”
anonymous
2012-08-07 09:43:55 UTC
PHP can be useful when creating sites


This content was originally posted on Y! Answers, a Q&A website that shut down in 2021.
Continue reading on narkive:
Loading...