• Categories
    • PHP
    • phpMyAdmin
    • PHPMailer
    • FFMpeg
    • PHPEXcel
    • PHPDoc
    • PHPUnit
    • CakePHP
    • CakePHP 2.0
    • Cake PHP 2.1
    • CakePHP Model
    • Facebook PHP SDK
    • composer-php
    • PHP 7
    • PHP GD
    All Categories
  • About

how to remove %20 in the url in php

php


PHP Snippet 1:

echo urldecode('newsdetail.php?id=In%20front%20%20of%20the%20houses');

PHP Snippet 2:

newsdetail.php?id=In front of the houses

PHP Snippet 3:

function cleanURL($textURL) {
  $URL = strtolower(preg_replace( array('/[^a-z0-9\- ]/i', '/[ \-]+/'), array('', '-'), $textURL));
            return $URL;
     }



while($row1=mysql_fetch_array($qry)) {
        <p class='news_title'><a href='newsdetail.php?id=".cleanURL($row1['news_heading'])."'>{$row1['news_heading']}</a></p>
    }

PHP Snippet 4:

$url = str_replace(' ', '-', strtolower($news_heading));

Related Snippets

Fetch files from next cloud storage and display in Laravel website

Get WooCommerce product variation attribute terms in admin products general box

How to get values inside <![CDATA[values]] > using php DOM?

How to create a scheduler application in php

Magento 2 - Controller returning blank page

Target class controller does not exist - Laravel 8

Laravel: Create morphs() relationship nullable

How to fix Call to undefined method AppModelsTableName::factory?

XAMPP keeps showing Dashboard/Welcome Page instead of the Configuration Page

How to debug in WooCommerce 3+

How to Create WooCommerce Subscription Product via. REST API?

What is PHP's equivalent of JavaScript's "array.every()"?

storagelogs/laravel.log" could not be opened in append mode: failed to open stream: Permission denied

PHP if in_array() how to get the key as well?

Laravel Route issues with Route order in web.php

About Contact Privacy policy Terms and conditions