title: WordPress: How to get all sub categories id and add the parent category's ID to the new array?
body: <p>I want to get all the sub categories' ID and add all the sub cat IDs and the parent ID　to a new array?</p>
  
  <p>For example:
  Parent $ID=1
    sub cat 1 :11
    sub cat 2 :12
    sub cat 3 :13
    sub cat 4 :14</p>
  
  <p>$arr = array(11,12,13,14)</p>
  
  <p>The result: $arr2 = array(1,11,12,13,14) // add parent ID to the array.</p>
  
  <p>$categories=get_categories($ID);</p>
  
  <p>Then I don't know what to do, please help me to solve the problem. Thanks.</p>