Category : PHP

ItSolutionStuff.com have tutorials for PHP, here you can study articles of PHP, PHP posts collection, most popular and useful tutorials of PHP, here you can find list of all relevant posts and example about PHP, we have lists of tutorials and examples about PHP.very simple and quick example collection of Latest PHP category.



Bootstrap form validation example with demo using validator.js plugin

We always need to add validation on form like registration form, contact form, login form etc. we always prefer to give validation error after page refresh but you can give validation without page refresh. If you use bootstrap then you can use easily validator.js plugin. validator.js plugin gives client side validation without page refresh. We can use simply. validator.js plugin we can add validation in our PHP project, or any framework like laravel framework, codeigniter framework, symphony framework etc. In this example i give you how can you give validation for require field, email, minle.....

By Hardik Savani | July 20, 2016 | | 187060 Viewer | Category : PHP
READ MORE

How to remove duplicate values from Array in PHP?

It is pretty simple to delete duplicate values from PHP Array. But sometimes we confuse for how can we remove. But PHP provide pre-define function array_unique that can help to remove duplicate values from Array. array_unique() through we can get only unique value from array. So, you can see bellow example i have 34 value two times but when i use array_unique() then it will return only unique value as bellow output: <strong>Example:</strong> <pre class="prettyprint lang-php"> $myArray = [11,34,56,78,34]; $myArrayNew = array_unique($myArray); print_r($myArrayNew); </pre> <strong>Output:</str.....

By Hardik Savani | July 14, 2016 | | 6868 Viewer | Category : PHP
READ MORE

How to get folder path from file path in PHP?

Sometimes, we require to get directory path from Image path or file url in our PHP website or any PHP framework website at that time we can get folder name using php pre-define function dirname. If you ever use this function then you can see as bellow example how it's works. I have one image url like, i want to just get folder path then you can get folder path like this way : <strong>Example:</strong> <pre class="prettyprint lang-php"> dirname('http://localhost:8000/upload/images/test.jpg'); </pre>

By Hardik Savani | July 4, 2016 | | 4806 Viewer | Category : PHP
READ MORE

How to add CKEditor with image upload using KCFinder in PHP Example Code?

We can implement ckeditor with image uploading in PHP simply. if you want to use ckeditor in your PHP project and you also want to add file uploading as well then you can do easily to follow bellow step. In this example i use ckeditor with KCFinder for image uploading. KCFinder through we can file upload easily using their api. If you don't know about ckeditor and KCFinder then no issue you can add simple way. Now, i will give you few step to set ckeditor with file uploading and you will easily apply this. this is a very simple to browse your image, file etc upload. <strong>Preview:</stron.....

By Hardik Savani | June 30, 2016 | | 28458 Viewer | Category : PHP
READ MORE

How to solve - you dont have permission to upload files in KCFinder ?

I was working on my project and implementing KCEditor and CKFinder (the free one) with image upload, but when i tried to upload image i found error like "you don't have permissions to upload files". So, i though maybe issue for folder permission because i used ubuntu OS. i gave whole ckfinder folder give full permission 777 and also give ckeditor folder too. but same error. At last i found how to solve it. So if you have also fetch this error then you have to open config.php file in conf folder of ckfinder and disabled equal to give false. <strong>ckfinder/conf/config.php</strong> <pre clas.....

By Hardik Savani | June 30, 2016 | | 10455 Viewer | Category : PHP
READ MORE

How to get filename from path in PHP?

Sometimes, we may require to get only filename or image name from full path or url in your PHP project or any framwwork project at that time you can get file name using php pre-define function basename. If you ever use this function then you can see as bellow example how it's works. I have one image url like, i want to just get image name then you can get image name like this way : <strong>Example:</strong> <pre class="prettyprint lang-php"> basename("http://itsolutionstuff.com/upload/Laravel-5-Mailgun.png"); </pre>

By Hardik Savani | June 30, 2016 | | 6225 Viewer | Category : PHP
READ MORE

Paypal payment gateway integration in php source code example

In this post i am going to give you example of how to integrate payment Paypal gateway in php with demo. It is very simple to use paypal payment method in your native php website because you don't need to use any api for paypal payment gateway integration. Paypal provide very simple way to do this and paypal also provide developer console i mean Sandbox account that way you can check it better. In this example i give you step by step payment integration of paypal. <strong>Preview:</strong> <img src="/upload/PHP-Paypal.png" width="100%" style="border:1px solid red"> <strong>Step 1: Create Sen.....

By Hardik Savani | May 31, 2016 | | 73351 Viewer | Category : PHP
READ MORE

How to get filename without extension in PHP?

If you need to get just filename from url withour file extension then you can get that using basename() php function. In bellow example i give you how to get image name without extension. first we need to get extension of given filename url and then basename() through we can remove that extension like as i did bellow: <strong>Example:</strong> <pre class="prettyprint lang-php"> $imagePath = "/home/hd/html/test.jpg"; $ext = pathinfo($imagePath, PATHINFO_EXTENSION); <br/> $file = basename($imagePath,".".$ext); print_r($file); </pre>

By Hardik Savani | May 26, 2016 | | 6980 Viewer | Category : PHP
READ MORE

How to remove white space from string in PHP?

Sometimes we require to remove white space from given string. So at that time you can delete spaces from string using str_replace() of core php. str_replace() will help to replace whitespace that way we can remove. you can do it from bellow example. <strong>Example:</strong> <pre class="prettyprint lang-php"> $myString = "this is only for you"; $resultString = str_replace(' ', '', $myString); print_r($resultString); </pre>

By Hardik Savani | May 20, 2016 | | 8239 Viewer | Category : PHP
READ MORE

PHP - File upload progress bar with percentage using form jquery example

Sometimes we require to show progress bar with percentage on file upload, because sometimes if we upload large size of file then we should too much wait without known perfect time. So at that time if we add progress bar with percentage then it is more comfort then other, that way user can see how much time it will take and how much upload. In this example i going to give you File upload progress bar with percentage using form jquery example in php. in this example i use form js that way we can upload using ajax and we don't need to page refresh. in this example you have to create only two fi.....

By Hardik Savani | May 19, 2016 | | 55903 Viewer | Category : PHP
READ MORE

    PHP AngularJS CRUD with Search and Pagination Example From Scratch

    PHP AngularJS CRUD with Search and Pagination Example From Scratch

    Open Post

    Laravel 5 create custom artisan command with example

    Laravel 5 create custom artisan command with example

    Open Post

    Bootstrap progress bar animate example using bootstrap-progressbar.js

    Bootstrap progress bar animate example using bootstrap-progressbar.js

    Open Post

    How to use elasticsearch from scratch in laravel 5?

    How to use elasticsearch from scratch in laravel 5?

    Open Post

    How to create Laravel Resource Controller example?

    How to create Laravel Resource Controller example?

    Open Post

    Laravel 5 Stripe example using Laravel Cashier from Scratch

    Laravel 5 Stripe example using Laravel Cashier from Scratch

    Open Post