I tried using the following code to get termId from the term:
$term = taxonomy_get_term_by_name($address_string); $termId = $term[0]->tid;
There is 1 result, but it appears as a term [30] - therefore the above code does not work.
I thought I could access the array of terms by looking at the first element - for example. $ Term [0]
What am I doing wrong?
Here is the result of var_dump ($ term):
array (size=1) 30 => object(stdClass)[270] public 'tid' => string '30' (length=2) public 'vid' => string '4' (length=1) public 'name' => string 'Thonglor' (length=8) public 'description' => string '' (length=0) public 'format' => string 'filtered_html' (length=13) public 'weight' => string '0' (length=1) public 'vocabulary_machine_name' => string 'areas' (length=5)
Thank you very much,
Pw
wanwu source share