PHP Data types

September 19, 2022

Data types are the different types of data we have in PHP. These are the different types of data that can be stored in variables. They include the following:

  • String – these are characters like Hello World. They are always wrapped inside double or single quotes.
  • Integer – these are whole numbers like 23000 and should never be in quotes.
  • Float (floating point numbers – also called double) – these are decimal numbers like 75.890. They should not be in quotes.
  • etc.

        $student = "Joan Smith";
	$tuition = 1500000;
	$amountPaid = 7000.349;


Among others, these are the most common data types you will encounter in your everyday work and the above snippet shows you show they are used.

Back To Top
%d bloggers like this: