• 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

How to modify CSS in a specific page of the WP admin dashboard (backend)

if statement inside concatenation

LARAVEL: How to fetch id dynamically in a query builder?

Laravel Nova, route not found

SQL to convert multiple rows into a single row of variable length

Laravel: HTML in notification

Laravel lang slug in url

is there any way to validate a field that sometime is File(image) && sometime is String(Src of same image)

carbon generated datetime not stored correctly into the database

Display Link Title Instead of URL in XSL

retrieve data from database using session

Why does array_map() with null as callback create an "array of arrays"?

I need to link Google Sheet with my Laravel

Get image type from base64 encoded src string

Error when uploading certain .png files "Interlace handling should be turned on when using png_read_image"

About Contact Privacy policy Terms and conditions