[TYPO3-german] Hilfe!

Nikola Galanov nikigalanov at web.de
Sat Dec 15 21:38:46 CET 2007


Hallo Reinhard,

ich habe es so gemacht, weil ich sowas brauche:

function getArray_long($res){
		$out = array();
		$i = 0;
		// here specific handling only for MediaDB
		while($row = $GLOBALS['TYPO3_DB']->sql_fetch_row($res)){
			$out[$i] = array();
			$out[$i][0] = (($row[0] == '')? $row[1] : '<a 
href="http://'.$row[0].'" target="_blank">'.$row[1].'</a>');
			$j = 0;
			foreach($row as $f){
				if($j > 1) $out[$i][] = $f;
				$j++;
			}
			$i++;
		}
		return $out;
	}	

Ansonsten schaue ich ob mindestens dein Vorschlag geht. Danke.

LG
Nikola


Reinhard Führicht schrieb:
> Nikola Galanov wrote:
>> Hallo NG,
>>
>> wer kann mir bitte sagen, was hier falsch ist?
>> Ich bin schon am verzweifeln...
>>
>>     function getArray($res){
>>         $arr = array();
>>         $i = 0;
>>         while($row = $GLOBALS['TYPO3_DB']->sql_fetch_row($res)){
>>             $arr[$i] = array();
>>             foreach($row as $f){ $arr[$i][] = $f; }
>>             $i++;
>>         }
>>         return $arr;
>>     }  
>> Vielen Dank
>> Nikola
> 
> Hallo,
> 
> warum nicht:
> 
> 
> function getArray($res){
>   $arr = array();
>   $i = 0;
>   while($row = $GLOBALS['TYPO3_DB']->sql_fetch_row($res)){
>     $arr[$i] = $row;
>     $i++;
>   }
>   return $arr;
> }
> 
> ?
> 
> lg,
> Reinhard


More information about the TYPO3-german mailing list