• 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

Smarty: undefined extension class 'Smarty_Internal_Method_Get_Template_Vars'

How to create a cookie to store the timestamp of when a page is first loaded with php

Applying programmatically a coupon to an Order in WooCommerce3

Inserting Country Selection into MySQL PHP [duplicate]

The sum of the user's points

How to Generate PDF invoice to XML format using mPDF

Attempt to read property "view" on null when sending password reset email

Upgrade PHP on AWS Linux

PHP: PDO + CSV export not downloading (headers issue?)

woocommerce get_order_report_data to show order_item_id

Return new collection without modifying original collection

PHP drop down list using array's and foreach (else and for) code

PHP: Telegram Bot: Insert line break to text message

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

Edit product hook WooCommerce

About Contact Privacy policy Terms and conditions