UrbanPro
true

Learn PHP from the Best Tutors

  • Affordable fees
  • 1-1 or Group class
  • Flexible Timings
  • Verified Tutors

Search in

Learn PHP with Free Lessons & Tips

Ask a Question

Post a Lesson

All

All

Lessons

Discussion

Lesson Posted on 27 Jul Learn PHP

What is Array in PHP | Types of Array

Divakar Kumar

I am a Software Engineer having 7+ Years of Experience in Web Development, I have an Expertisement in...

An array is a special variable, which can hold more than one value at a time or you can say An array stores multiple values in one single variable. If you have a list of items (a list of car names, for example), storing the cars in single variables could look like this: array() function is used to... read more

An array is a special variable, which can hold more than one value at a time or you can say

An array stores multiple values in one single variable.

If you have a list of items (a list of car names, for example), storing the cars in single variables could look like this:

 array() function is used to create an array

Example:- 

$cars = array("Volvo", "BMW", "Toyota");

In PHP, there are three types of arrays:

  • Indexed arrays - Arrays with a numeric index
  • Associative arrays - Arrays with named keys
  • Multidimensional arrays - Arrays containing one or more arrays


  • Indexed arrays - There are two ways to create indexed arrays:

    1) $cars = array("Volvo", "BMW", "Toyota");

    2) 
    $cars[0] = "Volvo";
    $cars[1] = "BMW";
    $cars[2] = "Toyota";
  • Associative arrays - Associative arrays are arrays that use named keys that you assign to them.

    There are two ways to create an associative array: 

    1) $age = array("Peter"=>"35", "Ben"=>"37", "Joe"=>"43");

    2) $age['Peter'] = "35";
    $age['Ben'] = "37";
    $age['Joe'] = "43";


Multidimensional arrays:- 

A multidimensional array is an array containing one or more arrays.

$cars = array (
  array("Volvo",22,18),
  array("BMW",15,13),
  array("Saab",5,2),
  array("Land Rover",17,15)
);



 
read less
Comments
Dislike Bookmark

Lesson Posted on 06/10/2020 Learn Php MySQL

How to connect mysql database in PHP ?

Puran Chand Saini

I am B Tech in computer science, with 20 years of experience in software development industry. I have...

<?php//db credential $servername = "localhost"; $username = "dbusername"; $password = "dbpass"; $databasename="dbname"; // Create connection$conn = mysqli_connect($servername, $username, $password,$databasename); // Check connectionif (!$conn) { die("Connection failed: " . mysqli_connect_error()... read more

<?php

//db credential
$servername = "localhost";
$username = "dbusername";
$password = "dbpass";
$databasename="dbname";

// Create connection
$conn = mysqli_connect($servername, $username, $password,$databasename);

// Check connection
if (!$conn) {
die("Connection failed: " . mysqli_connect_error());
}

read less
Comments
Dislike Bookmark

Lesson Posted on 19/05/2020 Learn PHP +2 Tuition IT Courses

A New Way To Learn Web Development.

Ajay

Contact me at : ajaydesai015@gmail.com I will teach you everything easily and that is my guarantee...

Hello, My name is Ajay. I work at a small IT company and yes on weekends provides some training and guidance and consultancy to students. Before past 7-8 months, I was just a random student just like so many students are right now, That I was so confused that whats should I do, Where should I start,... read more

Hello, My name is Ajay. I work at a small IT company and yes on weekends provides some training and guidance and consultancy to students. Before past 7-8 months, I was just a random student just like so many students are right now, That I was so confused that whats should I do, Where should I start, How to create results and that too faster. I asked so many peoples, but I was not getting that much clear advice to the road map to learn web development.

Finally, Later on, I started to learn by my self, Invested so many hours and learnt PHP and some other stuff. Also bought two professional paid courses on some online platforms and started working on my PHP skills. It is it from that self-learner to PHP developer I have learnt something which I want to share with you all guys.

Advice Number 0Choose One Technology.  Hey, I am a programmer, and for me, counting starts from 0. So step number 0 decides to learn one technology and be ready to spend an insane amount of time to spend on it. Why am I telling you to choose one at one time? To answer this, you should count how many numbers of technologies Web_Development includes : 

HTML, CSS, JavaScript, jQuery, AJAX, Bootstrap, Media Queries, SQL, Back End Languages and Front End Frameworks. Are they too much to start for freshers? Yes, No one will tell you to learn what and what not when you are a beginner. So learn whatever you want but first, select one and spend time on it and learn as much as you can about that one technology.

 

Advice Number 1: Build Some Projects. Let's say you picked HTML to start learning web development; Now you have learnt some tags, some syntax some rules, etc. Now, what should you do next? Should you start learning another technology as you completed learning one? No, No, my friend. Technology means nothing if you can not build something out of it. So make some HTML pages. Try to construct simple pages, Then navigate between the pages and then try to develop one professional page in which you put all of your learning together for development.

The same paragraph applies for CSS, PHP, JavaScript and all the other languages. Remember, Once you learn something. Build something out of it.

 

Advice Number 2:  Host Your Projects. Now you have learnt let's say HTML and also created some simple pages and some professional pages with HTML, Now should you learn new technology? Yes, you can learn, but I would still like to advice no you should not. Your HTML page is in your PC, Laptop or maybe on your phone. Do not you want to share it to the world? Yes, you should do that. If you have the budget, then host it on the real server. Otherwise there are so many free platforms which will allow you to host your project for free. You can search it directly or ask me I will let you provide an entire list and rules about those platforms.

The same paragraph applies for CSS, PHP, JavaScript and all the other languages. Remember, Once you build something. Host it so that you can share it to the world.

 

Advice Number 3: Learn New or Stick to Old. Now you have followed all the above steps and guess what now you are the smartest student among the others who are not following these steps. You learnt You have built and yes you can show it to the world that you put some time on a thing and you got something out of it. Now should you learn new technologies ? should you stick to one technology? Well, Now this time it depends on you, my friend. Either you want to master one technique or get intermediate knowledge on various technologies.

 

Advice Number 4Do a job. The above-given steps are superb, and you will get addicted to this process once you will dive in it. But remember if you have spent enough time just sitting at your home and build some projects. Then now do not learn a new language immediately. Yes, Apply for a job, Work for them let's say for two months and get adapted company's method, Your job role, how a company works. After 2-3 months now, you are free to learn and move forward.

 

Advice Number 5Advice/Help/Guide others. Hey, You have done all the things, and now you know how to move forward and how to follow this road map to start and end technology and build projects. Now my 5th advice would be if you have learnt and make your carrier from this and if my above given any information has worked for you, Then do not keep this knowledge to you only, some so many students are still trapped in the old school learning process and trapped in so many questions as you were before following step number 0. Go and tell them what steps worked for you and what are the key points, How they can build a carrier as you made.

I wrote this in Oct 2019 but publishing it right now as now I can ultimately say that above given process is tested on me, my friends and some other person who came to get advice from me. They all got results from this advice. When will you start or what are your thoughts on it let me know in the comment section.

 

Thank you for your time and for hearing me. 

read less
Comments
Dislike Bookmark

Learn PHP from the Best Tutors

  • Affordable fees
  • Flexible Timings
  • Choose between 1-1 and Group class
  • Verified Tutors

Lesson Posted on 01/04/2020 Learn PHP +1 CodeIgniter

Core PHP v/s PHP Frameworks

Husain Athar

- Having 10+ years of experience in programming and Web Application development using PHP, MySQL and...

PHP Frameworks: Framework is a piece of software by which one can develop large enterprise, robust & secure software applications. Frameworks provide straight forward flow and strict guidelines by which developers can create any stand-alone applications with proper security and architecture. Frames... read more

PHP Frameworks: Framework is a piece of software by which one can develop large enterprise, robust & secure software applications. Frameworks provide straight forward flow and strict guidelines by which developers can create any stand-alone applications with proper security and architecture. Frames itself follow some design principles. Hence developer need not to worried about application architecture. The developer needs to focus only on using a rich set of libraries and helpers to enhance application performance instead of writing the number of lines of code. Frameworks are designed given overall application security which includes database security (SQL injections), cross-browser scripting (XSS), access permissions etc. In general, the framework is an abstraction, where the developer doesn't care about how structure internally works instead of what it does. It means that the developer only needs to know how to flow rather than how flow happens internally.

 

Core PHP: Writing code in core PHP is right if you are developing SDK's (Software Development Kit) which acts as a third-party software for other applications. This SDK's can easily integrate with frameworks, as these are an independent piece of code. For example, payment gateways SDK's are easily integrated with other structures. Imagine if you develop SDK using framework. What will happen? Will SDK develop in CodeIgniter framework will integrate with Laravel Framework. The answer is "No". The reason is the flow and architecture of both structures are different. So it can't be integrated. 

 

But if you are not developing SDK's it would be preferred to use the framework. It will give you the quality of code, performance, security, reusability and easy deployment. 

 

read less
Comments
Dislike Bookmark

Answered on 10/03/2020 Learn PHP +2 Python Java

Charlie

Both the development programs come with their strong suits. While Java allows you to enjoy the cross-platform support, Python helps you execute on at least ten different operating systems. It would help if you determined as to what the end goal os before deciding on which program you are going to use.... read more

Both the development programs come with their strong suits. While Java allows you to enjoy the cross-platform support, Python helps you execute on at least ten different operating systems. It would help if you determined as to what the end goal os before deciding on which program you are going to use. Java for a beginner is not suitable, whereas, Python is ore forgiving as you have the liberty to take shortcuts. Additionally, many users find Python more easier to read and understand than Java. At the same time, Java code can be written once and executed from anywhere.

 

So choose wisely

read less
Answers 5 Comments
Dislike Bookmark

Answered on 10/03/2020 Learn PHP +2 Python Java

Charlie

Yes, you can use PyMob app where apps can be written purely in Python, and the compiler tool flow converts them in native source codes for various platforms. But there are some cons on using PyMob, the framework might not support every feature of an operating system or device, and you cannot always... read more

 

Yes, you can use PyMob app where apps can be written purely in Python, and the compiler tool flow converts them in native source codes for various platforms. But there are some cons on using PyMob, the framework might not support every feature of an operating system or device, and you cannot always use your tools. The code might not run as fast, and High-end Graphics and 3D support are often limited. It is to be noted that there is no vendor lock-in because Py-Mob does not use special features in Python, so it is run on any machine or environment, adding to this the IP is with the developer in both Python and the native source code, so, yeah there is no lock-in.

All the Best

read less
Answers 5 Comments
Dislike Bookmark

Learn PHP from the Best Tutors

  • Affordable fees
  • Flexible Timings
  • Choose between 1-1 and Group class
  • Verified Tutors

Answered on 10/03/2020 Learn PHP +2 Python Java

Charlie

If you do not have programming knowledge, then I recommend you to start with a language that is purely object-oriented based. Python is an application-based scripting language. It was mainly built to ease the task of the programmer. Whereas Java and C++ are object-oriented based. To get started, if you're... read more

If you do not have programming knowledge, then I recommend you to start with a language that is purely object-oriented based. Python is an application-based scripting language. It was mainly built to ease the task of the programmer. Whereas Java and C++ are object-oriented based. To get started, if you're not from a programming background, then I recommend you to understand the concepts of object-oriented programming and then shift to Python. If you already know either Java or C++, then you can concentrate on Python syntaxes and indentation. There are a lot of features Python hides, to make the language readable and straightforward. Programming beginners will not be able to thoroughly understand the concepts since most of the inside details are "encapsulated". It doe not make use of datatypes as well. This can be a disadvantage for newbies. 

Hence, to get started with Python, learn the basics of Object-oriented programming and then proceed further.

read less
Answers 4 Comments
Dislike Bookmark

Answered on 10/03/2020 Learn PHP +2 Python Java

Charlie

It depends on what application you're using it for. If you have to speak in terms of the latest technology trends like Data Science and Machine Learning, then Python is the king. If we're talking about application development, then Java has the upper hand, due to the speed and memory storage issues of... read more

It depends on what application you're using it for. If you have to speak in terms of the latest technology trends like Data Science and Machine Learning, then Python is the king. If we're talking about application development, then Java has the upper hand, due to the speed and memory storage issues of Python. So, it solely depends on the project you're working on, or the application you're using. Having said that, in terms of readability and creativity, Python is better than Java. No doubt Java is one of the top three programming languages, which are used in various applications, but in terms of simplicity and user-friendliness, Python is the best.

read less
Answers 3 Comments
Dislike Bookmark

Answered on 10/03/2020 Learn PHP +2 Python Java

Charlie

The learning stages of Python are: Learning the Basics like variables, control structures, Data structures, Syntax Tools and getting familiar with PPython Libraries.leaning about Frameworks like Django, Flask etc. and creating a website for yourself and working on projects that interest you and learning... read more

 

The learning stages of Python are: Learning the Basics like variables, control structures, Data structures, Syntax Tools and getting familiar with PPython Libraries.leaning about Frameworks like Django, Flask etc. and creating a website for yourself and working on projects that interest you and learning through the process. Learning Data structures and Algorithms can also be of great help to you. It is to note that, Python is one of the most natural and most potent languages to pick up and as a beginner, you can start with Jupyter notebook available within the Anaconda package.

All the Best

read less
Answers 4 Comments
Dislike Bookmark

Learn PHP from the Best Tutors

  • Affordable fees
  • Flexible Timings
  • Choose between 1-1 and Group class
  • Verified Tutors

Answered on 10/03/2020 Learn PHP +2 Python Java

Charlie

The people doing the most Artificial intelligence research are not the run-of-the-mill software engineers; they do not care about memory management, cost references, and multiple inheritances. They just want tools that would allow them to visualize thier data, put together an experiment in just a few... read more

The people doing the most Artificial intelligence research are not the run-of-the-mill software engineers; they do not care about memory management, cost references, and multiple inheritances. They just want tools that would allow them to visualize thier data, put together an experiment in just a few lines of code. Python lets them do all this, C++ does not. The underlying libraries doing the bulk of the data processing are actually C or C++. Python is used as a “glue language” which glues together multiple libraries and provides a higher-level API for accessing them.

 So that is why AI is driven by Python and not C++

 Happy coding

read less
Answers 4 Comments
Dislike Bookmark

About UrbanPro

UrbanPro.com helps you to connect with the best PHP Classes in India. Post Your Requirement today and get connected.

Overview

Questions 688

Lessons 42

Total Shares  

+ Follow 23,040 Followers

Top Contributors

Connect with Expert Tutors & Institutes for PHP

x

Ask a Question

Please enter your Question

Please select a Tag

X

Looking for PHP Classes?

The best tutors for PHP Classes are on UrbanPro

  • Select the best Tutor
  • Book & Attend a Free Demo
  • Pay and start Learning

Learn PHP with the Best Tutors

The best Tutors for PHP Classes are on UrbanPro

Book a Free Demo

UrbanPro.com is India's largest network of most trusted tutors and institutes. Over 55 lakh students rely on UrbanPro.com, to fulfill their learning requirements across 1,000+ categories. Using UrbanPro.com, parents, and students can compare multiple Tutors and Institutes and choose the one that best suits their requirements. More than 7.5 lakh verified Tutors and Institutes are helping millions of students every day and growing their tutoring business on UrbanPro.com. Whether you are looking for a tutor to learn mathematics, a German language trainer to brush up your German language skills or an institute to upgrade your IT skills, we have got the best selection of Tutors and Training Institutes for you. Read more