Home » PHP Tutorial

PHP Tutorial

Laravel – Facades

Facades provide a static interface to classes that are available in the application’s service container. Laravel facades serve as static proxies to underlying classes in the service container, providing the benefit of a terse, expressive syntax while maintaining more testability and flexibility than traditional static methods. Create Facade The following are the steps to create Facade …

Read More »

PHP String Functions

PHP provides various string functions to access and manipulate strings. addcslashes() – It is used to return a string with backslashesaddslashes() – It is used to return a string with backslashesbin2hex() – It is used to converts a string of ASCII characters to hexadecimal valueschop() – It removes white space …

Read More »

PHP String

PHP string is a sequence of characters i.e., used to store and manipulate text. There are 4 ways to specify a string literal in PHP. single quoted – We can create a string in PHP by enclosing the text in a single-quote. For specifying a literal single quote, escape it …

Read More »

PHP Array Functions

PHP provides various array functions to access and manipulate the elements of array. The important PHP array functions are given below. eg array_change_key_case – Changes the case of all keys in an array array_chunk – Split an array into chunks array_column – Return the values from a single column in …

Read More »

PHP Arrays

An array is a data structure that stores one or more similar type of values in a single value. For example if you want to store 100 numbers then instead of defining 100 variables its easy to define an array of 100 length. There are three different kind of arrays …

Read More »

PHP Functions

PHP function is a piece of code that can be reused many times. It can take input as argument list and return value.  Advantage of PHP Functions Code Reusability: PHP functions are defined only once and can be invoked many times, like in other programming languages. Less Code: It saves …

Read More »