values after the loop and 'get_post_meta'
-
Hello, I need help in the following code.
It’s strange because ‘$postIDSkateA[0]’, [1] & [2] are full, I am sure than containg values.I get the variables this way:
<?php
if ( !empty( $postIDSkate ) ) {
foreach ( $postIDSkate as $id ) {
$postIDSkateA[] = $id;
}
}$coordenadasSkate1 = get_post_meta($postIDSkateA[0], ‘coordenadas_skatepark1’, true);
$coordSkate1 = explode (‘,’, $coordenadasSkate1);$coordenadasSkate2 = get_post_meta($postIDSkateA[1], ‘coordenadas_skatepark2’, true);
$coordSkate2 = explode (‘,’, $coordenadasSkate2);$coordenadasSkate3 = get_post_meta($postIDSkateA[2], ‘coordenadas_skatepark3’, true);
$coordSkate3 = explode (‘,’, $coordenadasSkate3);?>
The explode is for separate the value in two. It works correctly. This is not the problem.
It’s very strange because I can print $coordSkate2, but no $coordSkate1 and $coordSkate3
What is it happen?
Something is bad…Thanks for the help. Im really locked..
- The topic ‘values after the loop and 'get_post_meta'’ is closed to new replies.