如何使用php

时间:2018-05-08 14:06:00

标签: php arrays multidimensional-array

如何将'  ' 值作为来自给定数组的字符串,因为数组可能会有所不同我只想提取' ' sim' 作为给出数组的示例,我知道它可能是一个简单的问题,但我是多维数组的新手,为什么似乎无法解决它。

 array (size=1)
  'adjective' => 
    array (size=2)
      'syn' => 
        array (size=7)
          0 => string 'cagey' (length=5)
          1 => string 'cagy' (length=4)
          2 => string 'canny' (length=5)
          3 => string 'apt' (length=3)
          4 => string 'cunning' (length=7)
          5 => string 'ingenious' (length=9)
          6 => string 'adroit' (length=6)
      'sim' => 
        array (size=4)
          0 => string 'adroit' (length=6)
          1 => string 'artful' (length=6)
          2 => string 'intelligent' (length=11)
          3 => string 'smar

array (size=2)
  'noun' => 
    array (size=3)
      'syn' => 
        array (size=23)
          0 => string 'passion' (length=7)
          1 => string 'beloved' (length=7)
          2 => string 'dear' (length=4)
          3 => string 'dearest' (length=7)
          4 => string 'honey' (length=5)
          5 => string 'sexual love' (length=11)
          6 => string 'erotic love' (length=11)
          7 => string 'lovemaking' (length=10)
          8 => string 'making love' (length=11)
          9 => string 'love life' (length=9)
          10 => string 'concupiscence' (length=13)
          11 => string 'emotion' (length=7)
          12 => string 'eros' (length=4)
          13 => string 'loved one' (length=9)
          14 => string 'lover' (length=5)
          15 => string 'object' (length=6)
          16 => string 'physical attraction' (length=19)
          17 => string 'score' (length=5)
          18 => string 'sex' (length=3)
          19 => string 'sex activity' (length=12)
          20 => string 'sexual activity' (length=15)
          21 => string 'sexual desire' (length=13)
          22 => string 'sexual practice' (length=15)
      'ant' => 
        array (size=1)
          0 => string 'hate' (length=4)
      'usr' => 
        array (size=1)
          0 => string 'amour' (length=5)
  'verb' => 
    array (size=2)
      'syn' => 
        array (size=29)
          0 => string 'love' (length=4)
          1 => string 'enjoy' (length=5)
          2 => string 'roll in the hay' (length=15)
          3 => string 'make out' (length=8)
          4 => string 'make love' (length=9)
          5 => string 'sleep with' (length=10)
          6 => string 'get laid' (length=8)
          7 => string 'have sex' (length=8)
          8 => string 'know' (length=4)
          9 => string 'do it' (length=5)
          10 => string 'be intimate' (length=11)
          11 => string 'have intercourse' (length=16)
          12 => string 'have it away' (length=12)
          13 => string 'have it off' (length=11)
          14 => string 'screw' (length=5)
          15 => string 'jazz' (length=4)
          16 => string 'eff' (length=3)
          17 => string 'hump' (length=4)
          18 => string 'lie with' (length=8)
          19 => string 'bed' (length=3)
          20 => string 'have a go at it' (length=15)
          21 => string 'bang' (length=4)
          22 => string 'get it on' (length=9)
          23 => string 'bonk' (length=4)
          24 => string 'copulate' (length=8)
          25 => string 'couple' (length=6)
          26 => string 'like' (length=4)
          27 => string 'mate' (length=4)
          28 => string 'pair' (length=4)
      'ant' => 
        array (size=1)
          0 => string 'hate' (length=4)

任何帮助将不胜感激!

0 个答案:

没有答案