php实现2个数组输出问题

WBOY
Release: 2016-06-23 13:43:18
Original
896 people have browsed it

    $units = explode(",",$row["units"]);
    //输出结果:Array ( [0] => 盆 [1] => 大鹏 )
    $brand = explode(",",$row["brand"]);
    //输出结果:Array ( [0] => 45 [1] => 56 ) 
?>

怎么实现:

大鹏


回复讨论(解决方案)

foreach($units as $k=>$v) {  echo "<a href='?id={$brand[$k]}'>$v</a>";}
Copy after login

source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!