问题描述
您好。如何使用多个变量进行爆炸?
我有,例如:<?$ tenants = explode(,,$ FUTURE_TENANT_NAME) ; foreach($ tenant as $ tenant){?>
租户名称:< hb><?= $ tenant; ?>
<?}?>
这个回报:
租户名称:Alexander Blabla
租户名称:Jack Blabla
租户名称:Stefan Blabla ......(完美)..
但我想要的是在声明中添加另一个变量来获取,例如:
租户电子邮件地址:(Alexander Blabla)alex @ blabla
租客邮箱地址:(Jack Blabla)jack @ blabla
租客电子邮件地址:(Stefan Blabla)stefan @ blabla
我尝试过:
我试过更改view_templates.php文件来创建一个包含姓名,姓氏和电子邮件的变量,但这种方法有效但不好,无论如何它往往会搞砸其他结果。
如果我尝试<?$ tenants = explode(,,$ FUTURE_TENANT_EMAIL); foreach($ tenants as $ tenant){?>
租户名称:< hb><?= $ tenant; ?>
<?}?>
我得到:租客的电子邮件地址:alex @ blablajack @ blablastefan @ blabla - 只有一次,换句话说它并没有真正爆炸。也许它没有在php文件中正确声明。
我找不到任何关于使用多个变量的信息。也许我问的是错误的问题?
hello. how do I get explode to work on more than one variable?
I have, for example: <?$tenants=explode(",",$FUTURE_TENANT_NAME);foreach ($tenants as $tenant){?>
Tenant name: <hb><?= $tenant; ?>
<?} ?>
this returns:
Tenant name: Alexander Blabla
Tenant name: Jack Blabla
Tenant name: Stefan Blabla ...(perfect)..
But what I want is to put another varaible into the statement to get, for example:
Tenant email address: (Alexander Blabla) alex@blabla
Tenant email address: (Jack Blabla) jack@blabla
Tenant email address: (Stefan Blabla) stefan@blabla
What I have tried:
I have tried changing the view_templates.php file to make a variable which includes name, surname and email, and this works but not well, and in any case it tends to screw up other results.
If I try <?$tenants=explode(",",$FUTURE_TENANT_EMAIL);foreach ($tenants as $tenant){?>
Tenant name: <hb><?= $tenant; ?>
<?} ?>
I get: Tenant email address: alex@blablajack@blablastefan@blabla - just once,in other words it doesnt really explode. maybe its not declared correctly in the php file.
I cannot find anything about using more than one variable. Maybe I am asking the wrong question?
推荐答案
这篇关于你好。如何在多个变量上进行爆炸?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!