Addictions'; $AlcoholismURL='Alcoholism'; $AnorexiaURL='Anorexia'; $ADDURL='Attention Deficit (ADD)'; $ADHDURL='Attention Deficit Hyperactivity (ADHD)'; $AutismURL='Autism'; $BipolarURL='Bipolar'; $BorderlineURL='Borderline Personality'; $BulimiaURL='Bulimia'; $DepressionURL='Depression'; $DownsyndromeURL='Down Syndrome'; $OCDURL='Obsessive Compulsive (OCD)'; $PanicURL='Panic'; $PhobiasURL='Phobias'; $PTSDURL='Post Traumatic Stress (PTSD)'; $SocialAnxietyURL='Social Anxiety'; $StressURL='Stress'; //---- Date ---- $today = getdate(); $day = $today[weekday]; $month = $today[month]; $digit = $today[mday]; $yr = $today[year]; $daytxt = $today[weekday]; // eg. Sunday $monthtxt = $today[month]; // eg. January $dayofmonth = $today[mday]; // eg. 4, digit $daynum = $today[wday]; // eg. 0, Sunday thru 6, Saturday $monthnum = $today[mon]; // eg. 12, December $dayofyrnum = $today[yday]; // eg. 365, last day of year ?>xml = $xml; } function _struct_to_array($values, &$i) { $child = array(); if (isset($values[$i]['value'])) array_push($child, $values[$i]['value']); while ($i++ < count($values)) { switch ($values[$i]['type']) { case 'cdata': array_push($child, $values[$i]['value']); break; case 'complete': $name = $values[$i]['tag']; if(!empty($name)){ $child[$name]= (@$values[$i]['value'])?(@$values[$i]['value']):''; if(isset($values[$i]['attributes'])) { $child[$name] = $values[$i]['attributes']; } } break; case 'open': $name = $values[$i]['tag']; $size = isset($child[$name]) ? sizeof($child[$name]) : 0; $child[$name][$size] = $this->_struct_to_array($values, $i); break; case 'close': return $child; break; } } return $child; } function createArray() { $xml = $this->xml; $values = array(); $index = array(); $array = array(); $parser = xml_parser_create(); xml_parser_set_option($parser, XML_OPTION_SKIP_WHITE, 1); xml_parser_set_option($parser, XML_OPTION_CASE_FOLDING, 0); xml_parse_into_struct($parser, $xml, $values, $index); xml_parser_free($parser); $i = 0; $name = $values[$i]['tag']; $array[$name] = isset($values[$i]['attributes']) ? $values[$i]['attributes'] : ''; $array[$name] = $this->_struct_to_array($values, $i); return $array; } } ?>