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

    Codeigniter - Dynamic dependent dropdown using jquery ajax Example

    Codeigniter - Dynamic dependent dropdown using jquery ajax Example

    Open Post

    Response download with file in Laravel 5.3 example

    Response download with file in Laravel 5.3 example

    Open Post

    AngularJS - How to create read more/less toggle using Directive?

    AngularJS - How to create read more/less toggle using Directive?

    Open Post

    PHP Codeigniter - Ajax Infinite Scroll Pagination Example

    PHP Codeigniter - Ajax Infinite Scroll Pagination Example

    Open Post

    Laravel 5 - Paypal Payment Integration example using netshell/paypal package from scratch

    Laravel 5 - Paypal Payment Integration example using netshell/paypal package from scratch

    Open Post

    PHP - Getting Started PHPUnit test with simple example

    PHP - Getting Started PHPUnit test with simple example

    Open Post