Answer the question
In order to leave comments, you need to log in
How to make individual links?
Hello everyone, I have an array
$webMoney = [
'wmr' => self::$stg['webmoney_r'],
'wmz' => self::$stg['webmoney_u'],
'wmu' => self::$stg['webmoney_z'],
];
<?php foreach( $webMoney as $key => $value ) : ?>
<li>
<a href="#<?=$key?>" tabindex="-1" data-toggle="tab">
Пополнить через <?=$key?>
</a>
</li>
<?php endforeach ?>
<a href="#<'wmr' => self::$stg['webmoney_r'], >" tabindex="-1" data-toggle="tab">Пополнить через <?=$key?></a>
<a href="#'wmu' => self::$stg['webmoney_u'], >" tabindex="-1" data-toggle="tab">Пополнить через <?=$key?></a>
<a href="#'wmr' => self::$stg['webmoney_z'], " tabindex="-1" data-toggle="tab">Пополнить через <?=$key?></a>
Answer the question
In order to leave comments, you need to log in
If the question is only how to do without a loop and insert values into html tags, then here:
<a href="#wmr" tabindex="-1" data-toggle="tab">Пополнить через <?=$webMoney['wmr']?></a>
<a href="#wmu" tabindex="-1" data-toggle="tab">Пополнить через <?=$webMoney['wmu']?></a>
<a href="#wmz" tabindex="-1" data-toggle="tab">Пополнить через <?=$webMoney['wmz']?></a>
<?foreach( $webMoney as $key => $value ) : ?>
<a href="#<?=$key?>" tabindex="-1" data-toggle="tab">Пополнить через <?=$value?></a>
<?endforeach?>
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question