skip to Main Content

Hello I have a project table which has a field name in my db which is multi lang so I stored it as json so I can store each lang value
the problem is that the arabic lang is being encoded in this way:

{"ar":"u0627u0644u0645u0634u0631u0648u0639 u0627u0644u0623u0648u0644"}

and im trying to search the project by name in arabic
I tried json endcoding the string before seaching the db didnt work
I tried even to searching in mysql or the string:
enter image description here

also didnt work … any idea?

2

Answers


  1. you must be use {{!! "ar":"…. !!}}

    Login or Signup to reply.
  2. decode the string after getting from database :

    $result = json_decode($jsonString, true);
    

    then get the arabic data

    $text = $result['ar'];
    

    then again decode the encoded string

    echo $finalanswer = json_decode('"' . $text . '"');
    
    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search