Jump to content

Xn Times using the same function


manalnor

Recommended Posts

Hello friends,

 

i'm getting error due to using an function for 3 times in same time

 

if i've 3 results and i want to base36_encode the 3 output

it only encode one and then gives me error

 

Cannot redeclare base36_encode() (previously declared)

 

here is the code

 

// this is the encode function //

function base36_encode($base10){
return base_convert($base10,10,36);
}

 

// i'm getting output here as 3 times (id) //

$id = base36_encode($line[id]);
echo "$id<br>";

 

the out but should be like this

id1

id2

id3

 

all have been base36 encoded

 

but it only show the 1st one

 

id1

and the rest gives me the error above...

 

so how can i make it works for all results not only the 1st one

 

thanks everybody

 

 

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

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.   Restore formatting

  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.

×
×
  • Create New...

Important Information

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.