0
내가 가지고있는 배열 사용자 정의 필드가 순서대로없는 상황이 여기에 있습니다. 모든 사용자 정의 필드를 순서대로 보유하는 방법을 알 수 있습니까?Wordpress에서 사용자 정의 필드를 순서대로 표시
나는 사용자 정의 배열을 얻기 위해 사용하는 기능은 다음과 같습니다
$title = get_post_meta($post_id, "cap-display_name", false);
foreach($title as $a){
echo 'hello '.$a.'<br><br>';
}
그러나, 내가 가진 출력은 다음과 같습니다
hello this is first
hello this is second
hello this is third
hello this is six
hello this is four
hello this is five
hello this is seven
가상적인 출력은 다음과 같습니다
hello this is first
hello this is second
hello this is third
hello this is four
hello this is five
hello this is six
hello this is seven
위의 출력을 얻는 방법을 알고 싶습니까?
에서 print_r ($ 타이틀)이 얻을 것이다
어레이 ([0] =>이 [1] =>이 두 번째 제 [3] =>이 제 [2] => 이것은 여섯 [4] => 이것은 네 [5] => 다섯 [6] =>이 일곱입니다)
'print_r ($ title)' – Dinesh