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 | | 1397 Viewer | Category : PHP
READ MORE

    Laravel 5 - Barcode generator example using milon/barcode package

    Laravel 5 - Barcode generator example using milon/barcode package

    Open Post

    How to retrieve number of twitter followers count without authentication or api ?

    How to retrieve number of twitter followers count without authentication or api ?

    Open Post

    How to execute artisan commands from route or controller in Laravel ?

    How to execute artisan commands from route or controller in Laravel ?

    Open Post

    PHP - How to make dependent dropdown list using jquery Ajax?

    PHP - How to make dependent dropdown list using jquery Ajax?

    Open Post

    Laravel 5 - How to create custom error page with example

    Laravel 5 - How to create custom error page with example

    Open Post

    How to get filename from file path in MySQL?

    How to get filename from file path in MySQL?

    Open Post