Activity Stream
48,167 MEMBERS
61147 ONLINE
besthostingforums On YouTube Subscribe to our Newsletter besthostingforums On Twitter besthostingforums On Facebook besthostingforums On facebook groups

Page 1 of 4 123 ... LastLast
Results 1 to 10 of 34

Hybrid View

Porsche_maniak How would you translate this in PHP... 29th Apr 2010, 06:19 PM
jomasaco Wat is $var an array, phrase... 29th Apr 2010, 06:45 PM
t3od0r first value in $var? then $var is... 29th Apr 2010, 06:45 PM
kiladila I think he want to do something... 29th Apr 2010, 06:47 PM
Porsche_maniak I think it is subarray.. like -... 29th Apr 2010, 07:36 PM
el_jentel1 Depends on the keys used for the... 29th Apr 2010, 07:50 PM
litewarez $result = (isset($var[0]) ? $var[0]... 29th Apr 2010, 07:54 PM
Robin H Isn't he talking about... 29th Apr 2010, 07:56 PM
el_jentel1 Then we have multidimensional... 29th Apr 2010, 08:00 PM
litewarez Multidimensional arrays still have... 29th Apr 2010, 08:02 PM
el_jentel1 $user = array( 'dob' =>... 29th Apr 2010, 08:09 PM
el_jentel1 You forgot your Post Code and your... 29th Apr 2010, 08:04 PM
Porsche_maniak Robin H it might so.. Do you want... 29th Apr 2010, 08:04 PM
litewarez yes show some code lol 29th Apr 2010, 08:06 PM
Porsche_maniak el_jentel1 thank you all but how do... 29th Apr 2010, 08:08 PM
el_jentel1 How to suffix the string "TEST" to... 29th Apr 2010, 08:10 PM
litewarez if(isset($entry_array) &&... 29th Apr 2010, 08:11 PM
Porsche_maniak el_jentel1 - yes 29th Apr 2010, 08:12 PM
Porsche_maniak The 2nd dimension is not an... 29th Apr 2010, 08:14 PM
litewarez so then $entry_array['entry'] does... 29th Apr 2010, 08:15 PM
Porsche_maniak Found and suffixed.Found and... 29th Apr 2010, 08:17 PM
Porsche_maniak You guys better check this link if... 29th Apr 2010, 08:18 PM
Porsche_maniak oopsssss 29th Apr 2010, 08:20 PM
litewarez dood, stop posting after each other... 29th Apr 2010, 08:23 PM
el_jentel1 If you want to see "TEST", you have... 29th Apr 2010, 08:23 PM
Porsche_maniak litewarez- sorry about that ... i... 29th Apr 2010, 08:26 PM
litewarez he means in the code he sent you... 29th Apr 2010, 08:27 PM
Porsche_maniak $entry_array[ 'entry' ][0] .=... 29th Apr 2010, 08:32 PM
el_jentel1 You're biting off more than you can... 29th Apr 2010, 08:37 PM
Porsche_maniak el_jentel1 - otherwise i wouldn't... 29th Apr 2010, 08:40 PM
litewarez i gave up 10 mins ago :D 29th Apr 2010, 08:40 PM
Porsche_maniak thanks for your effort :) 29th Apr 2010, 08:41 PM
Porsche_maniak And i hope that we will figure this... 29th Apr 2010, 08:51 PM
Lock Down // In the above code you posted to... 30th Apr 2010, 03:09 AM
Previous Post Previous Post   Next Post Next Post
  1.     
    #1
    Member
    Website's:
    maxneeds.info

    Question How would you translate this in PHP ?

    For first value in $var do something...


    I think it is subarray.. like - $entry_array[ 'entry' ] .. So t3od0r how to choose the first or any other value.. And btw the values are actually all entries/pages of content.

    I think if($entry_array[ 'entry' ][0]) works but if i want to do this ---

    if($entry_array[ 'entry' ][0]){$entry_array[ 'entry' ][0]=$entry_array[ 'entry' ][0].'TEST';}
    it adds 'TEST' to all entries not the first one...(maybe because the code like this means 'if exist'?)
    Porsche_maniak Reviewed by Porsche_maniak on . How would you translate this in PHP ? For first value in $var do something... I think it is subarray.. like - $entry_array .. So t3od0r how to choose the first or any other value.. And btw the values are actually all entries/pages of content. I think if($entry_array) works but if i want to do this --- if($entry_array){$entry_array=$entry_array.'TEST';} it adds 'TEST' to all entries not the first one...(maybe because the code like this means 'if exist'?) Rating: 5

  2.   Sponsored Links

  3.     
    #2
    Member
    Wat is $var
    an array, phrase...


  4.     
    #3
    Member
    Website's:
    wscripts.net damnlolscript.com lulzjet.com
    first value in $var?
    then $var is an array right? $var = array("1","2","3");
    first value : $var[0] -> will show 1

  5.     
    #4
    Member
    Website's:
    btjunk.net
    I think he want to do something with firs array value, not sure about that.

  6.     
    #5
    Member
    Website's:
    maxneeds.info
    I think it is subarray.. like - $entry_array[ 'entry' ] .. So t3od0r how choose the first or any other value.. And btw the values are actually all entries/pages of content.

    I think if($entry_array[ 'entry' ][0]) works but if i want to do this ---

    if($entry_array[ 'entry' ][0]){$entry_array[ 'entry' ][0]=$entry_array[ 'entry' ][0].'TEST';}
    it adds 'TEST' to all entries not the first one...(maybe because the code like this means 'if exist'?)

  7.     
    #6
    Member
    Depends on the keys used for the elements in the array. Keys, by default, are incrementing integers.

    PHP Code: 
    // Incremental integer keys assigned by PHP
    $fruits = array( 'Apple''Orange''Banana' );

    echo 
    $fruits[0];
    // Output: Apple

    echo $fruits[1];
    // Output: Orange 
    PHP Code: 
    // Explicitly assigned keys
    $fruitColors = array(
        
    'Apples' => 'red',
        
    'Oranges' => 'orange',
        
    'Bananas' => 'yellow'
    );

    echo 
    $fruitColors'Apple' ];
    // Output: red

    foreach( $fruitColors as $fruit => $color )
    {
        echo 
    $fruit ' are <span style="color:' $color ';">' $color '</span>.<br />' "\n";

    Output:
    Apples are red.
    Oranges are orange.
    Bananas are yellow.

  8.     
    #7
    Member
    Website's:
    litewarez.net litewarez.com triniwarez.com
    PHP Code: 
    $result = (isset($var[0]) ? $var[0] : null); 
    by the way you explained it you might want

    PHP Code: 
    for($i=0;$<=count($var);$i++)
    {
        switch(
    $i)
        {
            case 
    0:
                
    //First item here
                
    $var[$i] = strtolower($var[$i]);
            break;
            default:
                
    //All other elements in the array
                
    $var[$i] = strtoupper($var[$i])
            break;
        }

    Join Litewarez.net today and become apart of the community.
    Unique | Clean | Advanced (All with you in mind)
    Downloads | Webmasters


    Notifications,Forum,Chat,Community all at Litewarez Webmasters


  9.     
    #8
    Member
    Website's:
    epicimagehost.com
    Isn't he talking about multidimensional arrays?

  10.     
    #9
    Member
    Then we have multidimensional arrays.

    PHP Code: 
    // Two-dimensional array
    $produce = array(
        
    'fruits' => array( 'Apples''Oranges''Bananas' ),
        
    'vegs' => array( 'Tomatos''Potatos''Carrots' )
    );

    echo 
    $produce'fruits' ][0];
    // Output: Apples

    echo $produce'vegs' ][2];
    // Output: Carrots 

  11.     
    #10
    Member
    Website's:
    litewarez.net litewarez.com triniwarez.com
    Multidimensional arrays still have an index of numerics as well as strings so example

    PHP Code: 
    $user = array(
        
    'dob' => 25121988,
        
    'age' => 21,
        
    'profile' => array(
            
    'username' => 'litewarez'
        
    )
    );

    $profile_1 $user['profile']; //array(username ...)
    $profile_2 $user[2]; //array(username ...)

    //the same 
    try do this
    PHP Code: 
    print_r($entry_array); 
    to see the contents
    Join Litewarez.net today and become apart of the community.
    Unique | Clean | Advanced (All with you in mind)
    Downloads | Webmasters


    Notifications,Forum,Chat,Community all at Litewarez Webmasters


Page 1 of 4 123 ... LastLast

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. Translate page
    By skinner in forum Web Development Area
    Replies: 1
    Last Post: 1st May 2012, 01:35 PM
  2. How to translate a template ?
    By Debaldus in forum DLE
    Replies: 9
    Last Post: 20th Feb 2012, 07:58 PM
  3. need translate script
    By peterpetroli in forum Web Development Area
    Replies: 5
    Last Post: 29th Dec 2011, 03:39 AM
  4. DLE translate tuto
    By milooot in forum Webmaster Discussion
    Replies: 3
    Last Post: 3rd Aug 2011, 05:23 PM
  5. Can someone translate this for me
    By kohkindachi in forum Technical Help Desk Support
    Replies: 2
    Last Post: 3rd Oct 2010, 01:34 PM

Tags for this Thread

BE SOCIAL