略微加速

PHP官方手册 - 互联网笔记

PHP - Manual: Judy

2024-03-29

Judy Arrays

add a note add a note

User Contributed Notes 1 note

up
5
anis dot halayem at gmail dot com
3 years ago
Iterating through a Judy array with key as string and values of any type:

<?php
    $judy
= new Judy(Judy::STRING_TO_MIXED);
   
$judy["foo"]     = "bar";
   
$judy["veggie"]  = "carrot";
   
$judy["taste"]   = "sweet";

    if(
$judy->count() > 0) {
       
$key = $judy->first();
    do {
       
var_dump($judy[$key]);
    }while (!
is_null($key = $judy->next($key))) ;
    }
?>

官方地址:https://www.php.net/manual/en/book.judy.php

冷却塔厂家 广告
-- 广告
北京半月雨文化科技有限公司.版权所有 京ICP备12026184号-3