I've done this question today , helped me a lot, now I have the code:
foreach ($tokens as $row) {
$token1[] = $row['oauth_token'];
$token2[] = $row['oauth_token_secret'];
}
var_dump($token1);
var_dump($token2);
And it returns me:
Iwantedtoturnthesetokensallinto1indexjusthowcanIdothis?
Example:
0=>string'todosaqui';
===============================================
EDIT:1
Iwanttoextractindexes,fromarraysforexample,Inowhavethis:
usingthiscode:
while($tokens=$this->selectTokens()){foreach($tokensas$row){$tokenList[]=['oauth_token'=>$row['oauth_token'],'oauth_token_secret'=>$row['oauth_token_secret'],];}#$connection=newTwitterOAuth(CONSUMER_KEY,CONSUMER_SECRET,$tokenList['oauth_token'],$tokenList['oauth_token_secret']);var_dump($tokenList);break;}
Well,Ithinkyou'vefigureditout,nowIwantyoutounderstandthis:
$connection=newTwitterOAuth(CONSUMER_KEY,CONSUMER_SECRET,$tokenList['oauth_token'],$tokenList['oauth_token_secret']);
Thatis,getalloauth_token
andoauth_token_secret
,whichcomesfromabancodedados
,todoalooping.ButdoingsoIgetthis:
Just here $tokenList['oauth_token'], $tokenList['oauth_token_secret']