Tag : filter_var


How to check if string is URL or not in PHP?

Sometimes, we require to check the given argument or string is URL or not, as specially i did need to check image column is url or not like i give you example how to do this. If you also need to do this then you can use filter_var(). <strong>Example:</strong> <pre class="prettyprint lang-php"> if(filter_var($imagePath, FILTER_VALIDATE_URL) === FALSE){ print_r("Not valide URL"); }else{ print_r("valide URL"); } </pre>

By Hardik Savani | April 18, 2016 | | 553 Viewer | Category : PHP
READ MORE

    PHP - How to convert HTML file to PDF using Dompdf library?

    PHP - How to convert HTML file to PDF using Dompdf library?

    Open Post

    Dynamic Autocomplete search using Bootstrap Typeahead JS Example

    Dynamic Autocomplete search using Bootstrap Typeahead JS Example

    Open Post

    How to get Instagram followers count using JQuery Ajax?

    How to get Instagram followers count using JQuery Ajax?

    Open Post

    Laravel 5 create and download zip file example using chumper/zipper composer package

    Laravel 5 create and download zip file example using chumper/zipper composer package

    Open Post

    How to add charts in Laravel 5 using Chart JS ?

    How to add charts in Laravel 5 using Chart JS ?

    Open Post

    How to create custom facade in laravel 5.2?

    How to create custom facade in laravel 5.2?

    Open Post