简体   繁体   中英

I want insert new value in json which get from sql

$query2 = "SELECT distinct
                n.id AS 'channel_id',
                n.category_id,
                n.channel_name,
                n.channel_image,
                n.channel_url AS 'channel_url',
                n.channel_description,
                n.channel_type,
                n.video_id,
                c.category_name
            FROM
                tbl_channel n,
                tbl_category c

            WHERE
                n.category_id = c.cid AND c.cid = '$id' 
            ORDER BY n.id DESC 
            LIMIT $limit OFFSET $offset";
    ";

I want Insert New Value in Channels url

ex: i got output channel_url : https://edge.okezone.com/live/life.m3u8 but here i want to insert a new value in end of the url

You can just concatenate the output

$row['channel_url'] .= "new value";

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM