gpt4 book ai didi

php - 如何读取MySQL表中的多个数据

转载 作者:行者123 更新时间:2023-11-30 00:17:47 24 4
gpt4 key购买 nike

  ID    _   PAGE            _   TOKEN
_____________________________________________
1 _ Page Name _ IPADRESS#tokenID@BrowserName 34
..

示例数据:

  IPADRESS#tokenID@BrowserName 34
123.123.123.123#abcde987654321@Mozilla 34(Version)

如何单独读取token表?我想要这样的:

  <?php 
echo row['ip'];
echo row['browserName'];
echo row['browserVersion']; ?>

这样可以吗?

最佳答案

我做到了:

function multiexplode ($delimiters,$string) {

$ready = str_replace($delimiters, $delimiters[0], $string);
$launch = explode($delimiters[0], $ready);
return $launch;
}

$text = $row['token'];
$exploded = multiexplode(array("#","@"," "),$text);
print_r($exploded);

echo $exploded[0].'</br>';
echo $exploded[1].'</br>';
echo $exploded[2].'</br>';
echo $exploded[3].'</br>';

关于php - 如何读取MySQL表中的多个数据,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/23514020/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com