$ _POST superglobal에서 값을 수집하는 다음 배열로 배열을 작성해야합니다. ca_objets 값은 변수에서 모으고 점 뒤에있는 부분은 $ _POST에서 수집해야하는 부분입니다. 내가 필요로하는 결과를 $의 va_body 배열 내부의 "번들"배열을 채우고 얻기 위해 루프를 코딩하는 방법을 잘 모르겠어요
<?php
$table="ca_objects";
$bund=$_POST['find_bundles']; //This is an array with the values I need.
$va_body=array("bundles" => array()); //I declare the array outside the foreach loop.
:
$va_body=array(
"bundles" => array(
"ca_objects.description" => array("convertCodesToDisplayText" => true),
"ca_objects.description" => array("convertCodesToDisplayText" => true),
"ca_object.representations.caption" => array("convertCodesToDisplayText" => true)
)
);
이
내가 사용하는 코드입니다 . 어떤 도움이라도 대단히 감사하겠습니다.foreach ($bund as $elem) {
// code here
}
?>
감사 값을 분할! 그것은 나를 위해 정말로 유용합니다. –