php convert array to object
$object = (object) $array;
php convert array to object
$object = (object) $array;
convert php array to javascript array
<?php
$vegetables = ['apple', 'strawberry', 'banana'];
?>
<script>
var arr = "<?php echo implode(",", $vegetables); ?>".split(",");
console.log(arr); //["apple", "strawberry", "banana"]
Vue.component('#app7', {
props: arr,
template: '<li>{{ item.text }}</li>'
})
</script>
array to object php
$object = json_decode(json_encode($array), FALSE);
Copyright © 2021 Codeinu
Forgot your account's password or having trouble logging into your Account? Don't worry, we'll help you to get back your account. Enter your email address and we'll send you a recovery link to reset your password. If you are experiencing problems resetting your password contact us