Skip to main content

Featured

Host Laravel project on cPanel

Step 1:- First of all, we have to get all the files & directories into laravel_project folder. open your terminal & go inside your project folder,  And run the command  php artisan cache:clear . to clear your cache. then run  php artisan config:clear to clear the cached version of your config file, if there is any. Now make a zip folder of your project’s folder for ex. Laravel_project Step 2 : – Upload your folder After login to your cPanel, for uploading folder go to File Manager, & upload your folder in root directory, i have created laravel_project folder in root directory.   Step 3 :-             Unzip (your project’s folder) laravel_project  open laravel_project folder and move all the public folder content into public_html directory. so make sure that, you do not have to keep anything in public folder, it should be blank. Step 4 :- keep .htaccess file into public_html & into (your created folder) laravel_project that is outside the public_htm

PHP | strval() Function

The strval() function is an inbuilt function in PHP and is used to convert any scalar value (string, integer, or double) to a string. We cannot use strval() on arrays or on object, if applied then this function only returns the type name of the value being converted.

Syntax:

strval( $variable ) 

Parameter: This function accepts a single parameter $variable. This parameter represents the value which we want to convert to string

Return value: This function returns a string. This string is generated by typecasting the value of the variable passed to it as a parameter.

Below programs illustrate the strval() function.



code 1

filter_none

edit

play_arrow

brightness_4

<?php
  
$var_name = 32.360;
  
// prints the value of above variable 
// as a string
echo strval($var_name);
  
?>

Comments