Want to improve this question? Add d开发者_C百科etails and clarify the problem by editing this post.
Closed 10 hours ago.
Improve this questionI am using this snippet on my WordPress website `
$value = get_post_meta( get_the_ID(), "_lottery_instant_ticket_numbers_prizes", true );
print_r($value);
This is returning the following:
Array ( [1] => Array ( [ticket] => 31 [prize] => £35 ) [2] => Array ( [ticket] => 74 [prize] => £35 ) [3] => Array ( [ticket] => 88 [prize] => £35 ) )
May you please let me know what should be done to display the results in a good appealing way, without the word "array" and the arrows? My idea is to make a table maybe or anything to display data from the metadata of the post/product `
I only tried what I typed above
as ADyson suggested, echo $value[2]["ticket"]; is the answer, it worked. Thank you so much for giving me a hand!
精彩评论