Jump to content

[SOLVED] how to get the array name cheers


redarrow

Recommended Posts

how can i get the name of the array that are part off the array.

 

example

 

<?php
$users=array("john"=>"dog","paul"=>"mouse","smith"=>"kitten");
?>

 

 

say i wanted to add passwords manualy in a array order how it done .

 

this is tottally wrong man going nuts lol.

 

<?php

$current_user="john";
$current_password="dog";

$users=array("john"=>"dog","paul"=>"mouse","smith"=>"kitten");

if(in_array($current_user,$users)&& in_array($current_password,$users)){

echo "$current_user 
      <br><br>
      <b>SECREAT INFO:</b>";

}else{

echo"You are currently not on my list of active user's please contact us imaditly.";
}

?>

Link to comment
https://forums.phpfreaks.com/topic/171891-solved-how-to-get-the-array-name-cheers/
Share on other sites

i want to no them both as a password match but using array literal names and results

 

as u can see the in_array will work but only with the result now i need to add another array function to read what was the litral name of that array.

<?php

$current_user="john";
$current_password="dog";

$users=array("john"=>"dog","paul"=>"mouse","smith"=>"kitten");

if(in_array($current_user,$users)&& in_array($current_password,$users)){
   
   echo "$current_user 
         <br><br>
         <b>SECREAT INFO:</b>";
   
}else{
   
   echo"You are currently not on my list of active user's please contact us imaditly.";
}

?>

i want to no them both as a password match but using array literal names and results

 

as u can see the in_array will work but only with the result now i need to add another array function to read what was the litral name of that array.

<?php

$current_user="john";
$current_password="dog";

$users=array("john"=>"dog","paul"=>"mouse","smith"=>"kitten");

if(in_array($current_user,$users)&& in_array($current_password,$users)){
   
   echo "$current_user 
         <br><br>
         <b>SECREAT INFO:</b>";
   
}else{
   
   echo"You are currently not on my list of active user's please contact us imaditly.";
}

?>

 

i got you all thinking it all good, but i need to use the name off the littoral array name help lol

cheers king.

 

but while your there pal , have you used the curl to get hotmail messages throw php or your users from hotmail from php using curl.

 

got a dating site goes well but find it imposable to create somethink to get anything from hotmail service any idears pal.

dude, even as I'm smashed I can't understand a damn thing you are saying redarrow.  I was sure that was the key...fuck man.. don't take that the wrong way, not makin' fun of you... but seriously, I want to try an experiment.  Can you post your question in your native tongue and let me run it through google translator?  Seriously.  Really am curious.  I want to compare results.  Maybe I'll understand the google translator so I can help you out.  Yeah.  That's it.

dude, even as I'm smashed I can't understand a damn thing you are saying redarrow.  I was sure that was the key...fuck man.. don't take that the wrong way, not makin' fun of you... but seriously, I want to try an experiment.  Can you post your question in your native tongue and let me run it through google translator?  Seriously.  Really am curious.  I want to compare results.  Maybe I'll understand the google translator so I can help you out.  Yeah.  That's it.

that's some godamned funny shit..

:happy-03:

Archived

This topic is now archived and is closed to further replies.

×
×
  • 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.