Jump to content

How to call function within function?


sonuyos

Recommended Posts

Alright, so i have setup a code in a module, in my whmcs.

 

I want to excute the main function again or a part of the function again

 

usually what i can do is

 

if(strpos($data, $word) !== false){
    changeips();
}

here changeips() is a function that i can call and it will go back to the top and run it again till the if is satisfied, but when i try to setup the code in module, like a function within function, it just doesnt run, it skips over, can anyone help me?
    

Example - This doesnt run.

function modulename_mycode($parms) {

XXX

XXX

XXX

XXX 

function changeips(){

YYY

YYY

YYY
$data = 'XXX';
$word = 'YYY';
if(strpos($data, $word) !==false){
  changeips();
}

}

However it just doesnt do anything, i trigger it in admin area, and i get no reply back.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use & Guidelines and understand your posts will initially be pre-moderated