Jump to content

Reap38

New Members
  • Posts

    5
  • Joined

  • Last visited

Posts posted by Reap38

  1. O have a value of coin base system and the user may have 73020 coins 
    now the data base reads out the 73020 coins no problem but 
    the php is not reading the last 0 because its a null or empty or something and its just not liking the 0 at the end of the string

    so lets say 
    $mycoins = $row['mycoins'];
    and this echos out 73020

    what this 73020 is really saying is this
    once its all converted out correctly

    $73.02%0

    So what I thought I needed to do was count the string first to get all the numbers and place if count == 5 I could do the row statement for the ten dollar section or if count == 6 i could so that row for the hundreds and so on.

    but i can not solve the 0 issue 

    so lets write a simple code 


     

     

    <code> 
    $mycoins = '73020';

    $count_mycoins_string = strlen($mycoins);
    echo $count_mycoins_string;

    I would think the result would be 5
    but it counts 4 because the last number of the string is 0 how can i fix that?
    </code>

  2. lets say this:

     

    rows

    id=100

    id=101

    id=102

    id=103

     

    we are in a while loop 

    we have $1000.00 and want to share  with all members 50% of teh 1000.00
    so id = 100 gets 500.00
    and id = 101 gets 500.00
    we need to remember last paid member so we store id = 101
    we now need to run the script again because we earned 1000.00 more to share to th other two members
    so the script needs to know to start at row id=102


    how ever thats a small version of the percentage of the shares and member count we have 13k members now. so the row count is 13k rows
    I will hire someone to come check this out and help me out to get this script working. 

  3. When you echo a var
    echo $var = "SOMETHING";

    do you see you started with the ""  Quotes

    so a quote will cancel out code so if you start with qoutes us ' ' as qout marks inside your code.. but f you use ' ' as your start us quotes as your code//
     

    $content .= " <td> <a href='$varcomplete'><img src='wp-content/custom/imageicon.png' alt='imageicon' border='0'></a> </td>    "; 

    or 
     

    $content .= '<td> <a href="$varcomplete"><img src="wp-content/custom/imageicon.png" alt="imageicon" border="0"></a> </td>';

    or cancel out the quotes ith back slash
     

    $content .= "<td> <a href=\"$varcomplete\"><img src=\"wp-content/custom/imageicon.png\" alt=\"imageicon\" border=\"0\"></a> </td>";
  4. Say i have 8000 IDs and I start from the 1st id and count down in a while loop..

    but say i can only count down 3000 rows of ids before its empty..

    so i saved the last id that got filled.

    but how can i start from the row where i left off to fill the rest of the 8000 i only filled 3000
    so now i need to select row line 3000 and count down again to the end of the row unless empty then save the last id filled

    did that make sense?

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