У меня есть 2 массива $finalTitle
и $finalDescription
Я использовал array_merge
и создаю основной массив как $finalResult
и выводу как показано ниже
[
{
title: "ABC's Script"
},
{
title: "DEF's Script"
},
{
title: "GHI's Script"
},
{
title: "JKL's Script"
},
{
description: "My Name is ABC, I am living in Rajkot, I can able to speak English Language."
},
{
description: "My Name is DEF, I am living in Surat, I can able to speak Hindi Language."
},
{
description: "My Name is GHI, I am living in Vadodara, I can able to speak Tamil Language."
},
{
description: "My Name is JKL, I am living in Ahmedabad, I can able to speak Gujarati Language."
}
]
Я хочу получить результат массива, как показано ниже в конечном выводе,Я хочу title
и description
в одном массиве вместо другого имени массива.
[
{
title: "ABC's Script",
description: "My Name is ABC, I am living in Rajkot, I can able to speak English Language."
},
{
title: "DEF's Script",
description: "My Name is DEF, I am living in Surat, I can able to speak Hindi Language."
},
{
title: "GHI's Script",
description: "My Name is GHI, I am living in Vadodara, I can able to speak Tamil Language."
},
{
title: "JKL's Script",
description: "My Name is JKL, I am living in Ahmedabad, I can able to speak Gujarati Language."
}
]