Jump to content

[SOLVED] outputting just the result of an array... I'm sure it's easy.


Dragen

Recommended Posts

okay.. i'm sure this is extremely simple but....

I'm trying to print the results of an array taken from my database.

here's my code:

$subc = array($subcdat);
print_r($subc);

The problem it's outputting:

Array ( [categories_name] => Spoon Boy )

when I only want it to output: Spoon Boy.

I'm trying to save the spoonboy as a variable to use, so I'm using the print_r function to check what it's outputting. If it's outputting correctly I'll use $subc as the variable to read from.

 

Hopefully that makes sense!

Thanks

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.