Jump to content

aliento

Members
  • Posts

    169
  • Joined

  • Last visited

Profile Information

  • Gender
    Not Telling

aliento's Achievements

Regular Member

Regular Member (3/5)

0

Reputation

  1. Thank you , i dont want to query the mysql. I need string process .
  2. This is the array : $data = array( /* ("field")*/ array(1, 2 , 3)), array(array(1, 2 , 3)), array(array(1, 2 , 3)) );
  3. @titan21 No again it returns the same. @Kira $data is an array and $var is an array but not integers. The $i is int i mean.
  4. No it does not work returns Warning: Invalid argument supplied for foreach() Thank you.
  5. Hello, I want to know which is the table in the sql SELECT query. What i have done to take fields : $temp_sql = strtolower($sql); $pos = stripos($temp_sql, 'select'); $str = substr($temp_sql, $pos); $str_two = substr($str, strlen($start)); $second_pos = stripos($str_two, 'where'); $temp_fields = substr($str_two, 0, $second_pos); $fields = trim($temp_fields); But for table i don't know what to do. After the table can end the string or can be a WHERE or ORDER . Is there any way to take it. Until now i use $temp = explode(' ',$sql); $table= $temp[3]; Thank you
  6. Hello , I have a table like $data[$var][$i] $data is an string, $var is a string and $i is an index int. I am tired to write for($i=1;,$i<=count($$data[$var],$i++) { echo $data['id'][$i] ... }oouuuff How i can make it with foreach ? I tried foreach ($data -> $field as $value) echo $value; but i doesnt work. Any advise ?
  7. For the archive and better understudying i write the code below : php file : for($i=0;$i<count($fields);$i++) echo '<td>'.$fields[$i].'<input type="checkbox" name="field_check[]" id="c'.$i.'" /></td>'; //and for the onclick : for($iii=0;$iii<count($fields);$iii++) echo '<td onclick="check(\'c'.$iii.'\',\'c'.$ii.'\')">'; the javascript is : function check(n1,n2) { document.getElementById('n1').checked=true; document.getElementById('n2').checked=true; } I cant find any mistake. Can you?
  8. Ok i will make it simple . lets say i got this js function function check(n1) { n1 = "c" + n1; document.getElementById('n1').checked=true; } or function check() { chu = "checke"; document.getElementById('something').chud=true; } // the chu is the variable. and with the d makes checked? The question is how the javascript recognize the variable. I know php and html, i can read javascript and 'write' but i dont know the basics.
  9. I am trying to parse to the js function 2 variables. Each will be the id of the checkboxes.A want to check those 2 checkboxes.I use the variables into document.getElementById('n1').checked=true which the variable is the n1 but it doesnt recognize it as variable!
  10. hello. i am using this code to call the javascript function and change the attribute . The code to call the js function is (with php) onclick="check('.$ii.','.$iii.')" and the check function is function check(n1,n2) { document.getElementById('n1').checked=true document.getElementById('n2').checked=true } but it doesnt work.
  11. Your question is very general. Post the code you want help and not all the script, no one will download the script to help you! :life is an human invention . They told us about life to afraid to death the death
×
×
  • 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.