D
D
Deman12018-02-18 14:33:16
PHP
Deman1, 2018-02-18 14:33:16

How to fix the definition problem?

Hello, tell me how to fix it on version php 5.4 it works and it doesn’t work on 5.6

<?if($styles == 0):?>
        <link href="/../../../../../../../assets/layouts/layout4/css/themes/default-rtl.min.css" rel="stylesheet" type="text/css" id="style_color" />
        <?endif;?>
        <?if($styles == 1):?>
        <link href="/../../../../../../../assets/layouts/layout4/css/themes/light-rtl.min.css" rel="stylesheet" type="text/css" id="style_color" />
        <?endif;?>
        <span class="widget-thumb-body-stat" data-counter="counterup" data-value="100000"><?$userov = 0;
foreach($users as $itemr): ?>
<? $userov++; ?>
<?endforeach;echo $userov; ?></span>

Answer the question

In order to leave comments, you need to log in

1 answer(s)
B
Barmunk, 2018-02-18
@Deman1

<?php if($styles == 0): ?>
    <link href="/../../../../../../../assets/layouts/layout4/css/themes/default-rtl.min.css" rel="stylesheet" type="text/css" id="style_color" />
<?php endif; ?>

<?php if($styles == 1): ?>
    <link href="/../../../../../../../assets/layouts/layout4/css/themes/light-rtl.min.css" rel="stylesheet" type="text/css" id="style_color" />
<?php endif; ?>

 <span class="widget-thumb-body-stat" data-counter="counterup" data-value="100000">
 	<?= count($users); ?>
</span>

You can just use count. And in the style of such paths bad manners, use an absolute path.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question