I'm trying to do something out of my league, but I don't see how else I can achieve it.
I have two array variables.
<?php
$mobile_eu = array("alb", "bul");
$m_alb = array(array("Albanian"), array("test@test.com"),
array("test2@test.com", "test3@test.com");
?>
What I'm trying to do is, get alb
from $mobile_eu
, prepend a string to the value, and then access $m_alb
from it with [0][0]
index. Something like...
function createLink($category) {
foreach ($category as $short) {
$langcode = "\$m_" . $short . [0][0];
}
}
and yes, it doesn't work. When I dumped it, all it shows is
string 'alb0' (length=4)
What I hope to achieve here is to get
string 'Albanian' (length=8)
Is there any way to get this?
Any help would be great. Thanks.