• 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 convert binary string to normal string in php

phpstringlaravelencodingutf-8


PHP Snippet 1:

if(!mb_check_encoding($string)) {
    $string = iconv("LATIN1", "UTF-8//TRANSLIT//IGNORE", $string);
}

Related Snippets

Get all WooCommerce products within own plugin

best way to store error messages in Laravel (session or variable)

Don't show recurring price for WooCommerce subscriptions worth 0$

How to Mock the Request Class in Laravel?

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

Is it possible to change the table name in the migration file-laravel

Popup Window and PHP form

How can I remove the "Advanced" panel of all blocks in WordPress block editor?

Split array into 4-element chunks then implode into strings

How do I set the maximum php memory limit

Check if user online laravel

XAMPP/SQLSRV: Unable to find Sqlsrv in PHPINFO(); - errors coming from connection

Live search query using JS and PHP for QA forum

PHP array stringify

How do I upload a laravel project on cPanel shared hosting?

About Contact Privacy policy Terms and conditions