If this is your first visit, be sure to
check out the FAQ by clicking the
link above. You may have to register
before you can post: click the register link above to proceed. To start viewing messages,
select the forum that you want to visit from the selection below.

Enjoy an ad free experience by logging in. Not a member yet? Register.

Problem is, $getcat keeps coming up empty if I use the $info[2] variable, but if I put in the actual name, such as "Silverado 1500", it works fine so I know it's connecting and finding the name just fine, just comes up empty when using the $info[2] variable.

And that's what you are comparing to.
Don't know what simple_html_dom_node class is, but I'd presume it has a way to fetch the value. I can see it there nested a couple of down, but you'll need to consult the documentation for the simple_html_dom_node class to see how to fetch out out of there.

And that's what you are comparing to.
Don't know what simple_html_dom_node class is, but I'd presume it has a way to fetch the value. I can see it there nested a couple of down, but you'll need to consult the documentation for the simple_html_dom_node class to see how to fetch out out of there.

Is there anyway to pull the value from $info[2] to another variable and then query the new variable?

This way seems to work:

PHP Code:

$test = "{$info[2]}";var_dump($test);

Well...no, it didn't, the var_dump shows the right variable, but when I plug $test into the query, still pops up nothing :\

Users who have thanked AndrewGSW for this post:

I don't really see the need to pull out the offset to a different variable. The problem here is you are trying to pass an object to the sql string which doesn't appear to have a way to interpret it properly. My expectation is that the echo also will not work, but PHP's toString is flaky over different versions for where it is interpreted. If it shows properly within the echo, you can force the __toString() call on it to return the string representation.
Consult the documentation for the simple_html_dom_node to see what you need to do to extract it out of there.