how to limit sql column information

0

Good evening, in a script I use I added this string to get some information,

<div class="col"><b><?= $this->lang->line('imei');?>:</b> <?=$db['custom_field'];?></div>

and the result is:

{"494d4549":"123456789098765"}

But just wanted to submit 123456789098765

How can I limit this information? Thank you.

    
asked by anonymous 30.11.2015 / 00:59

2 answers

0

First, try not to use the short tags of PHP, they can cause problems because, depending on the server where you host your source code, they may not be accepted.

Then you can use

array_values() [protótipo: array array_values ( array $input )]

to get only the key associated with array values.

    
30.11.2015 / 03:20
0

I do not know if I understood the right question, but I think what you are looking for is this:

    <div class="col"><?=$db['custom_field'];?></div>
    
30.11.2015 / 02:58