Jump to content
×
×
  • Create New...
  • 0

[PHP]Function as argument


FlorinMarian

Question

  • Premium

Hello !

How to call correctly that function ? 

Thank you !

<select class="search_field" name="socket0">
          <?php
                  echo'<option value=strtotime("+1 days")> ---- 1 Zi</option>';

                 echo'<option value=strtotime("+3 days")> ---- 3  Zile</option>';

                 echo'<option value=strtotime("+7 days")> ---- 7  Zile</option>';

                 echo'<option value=strtotime("+10 days")> ---- 30 Zile</option>';

            foreach($itemSteine AS $aKey => $aValue) {

              echo'<option value="'.$aKey.'">'.$aValue.'</option>';
            }
          ?>
        </select>

Link to comment

3 answers to this question

Recommended Posts

  • 0

<select class="search_field" name="socket0">
          <?php
                  echo '<option value='.strtotime("+1 days").'> ---- 1 Zi</option>';

                 echo '<option value='.strtotime("+3 days").'> ---- 3  Zile</option>';

                 echo '<option value='.strtotime("+7 days").'> ---- 7  Zile</option>';

                 echo '<option value='.strtotime("+10 days").'> ---- 30 Zile</option>';

            foreach($itemSteine AS $aKey => $aValue) {

              echo'<option value="'.$aKey.'">'.$aValue.'</option>';
            }
          ?>
        </select>

  • Love 1
Link to comment
  • 0
  • Premium
3 minutes ago, iltizio said:

<select class="search_field" name="socket0">
          <?php
                  echo '<option value='.strtotime("+1 days").'> ---- 1 Zi</option>';

                 echo '<option value='.strtotime("+3 days").'> ---- 3  Zile</option>';

                 echo '<option value='.strtotime("+7 days").'> ---- 7  Zile</option>';

                 echo '<option value='.strtotime("+10 days").'> ---- 30 Zile</option>';

            foreach($itemSteine AS $aKey => $aValue) {

              echo'<option value="'.$aKey.'">'.$aValue.'</option>';
            }
          ?>
        </select>

It works, now I have another problem.

Items get time from time adding in itemshop, any idea how to create a cronjob to update socket0 daily for specific items with new value for 30 days ?

 

Link to comment

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Announcements

  • -15% Discount in Metin2 Dev Store (01/10/2021 => 31/12/2021) => Code => 15_PCT_OCT_TO_DEC_2021


Important Information

Terms of Use / Privacy Policy / Guidelines / We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.