Jump to content

brainstem

New Members
  • Posts

    9
  • Joined

  • Last visited

    Never

Profile Information

  • Gender
    Not Telling

brainstem's Achievements

Newbie

Newbie (1/5)

0

Reputation

  1. I have a form that passes all data to a processing file that basically says :: If your a field with a value, print the key, and print the value, pack it together and send it in an email. However, for some reason I can't get it to step through a checkbox array. I know this is gonna be easy, so plz be nice. Im just so busy I cant think too hard on this atm. ANY HELP IS APPRECIATED. Here is the main processing code: <?php foreach ( $_POST as $key => $value ) { if ($key != "allpass" && $key != "reqs" && $key != "send") { if (is_array($key)) { foreach ($key as $keyval) { $dcinput .= "<tr><td><strong>".$key.":</strong> </td><td>".$keyval."</td></tr>"; } } else { $dcinput .= "<tr><td><strong>".$key.":</strong> </td><td>".$value."</td></tr>"; } } } ?>
  2. you need to check out php_iconv.dll. http://us3.php.net/manual/en/ref.iconv.php
  3. Need a little bit more Joe. are you trying to sort the lines or the data within the lines? or both? and are you trying to sort just a specific line or all lines?
  4. Is PHP parsed in the noscript element when the agent has script enabled? I am trying to work out a conditional script that sets other session variables when the browser sends the -noscript- signal and pulls data from the <noscript element. Thanks in advance.
  5. All I am trying to do is get all the text from a file and display them like this: your not good enough at php yet to figure this crap out brainstem growl This is what I have, I can not for the life of my figure out a way around array_values $massive = str_word_count(file_get_contents('massive.txt', 1)); $massivechunk = array_chunk($massive, 2, FALSE); print_r(array_values($massivechunk)); for ($i = 0, $c = 10; $i < $c; $i++) { foreach (($massivechunk[$i]) as $domassive) { echo $domassive; echo "<br>"; } }
  6. I can't quite figure this one out, need some help widdit. pulling all content from a file via file_get_content('massive.txt'); and chunking it all into 2 word arrays problem is when I go to foreach ($arr as $value) echo $value it just spits out a rediculous amout of 'Array' echos. tried a for loop as well with no luck. how can I take a huge chunked array and strip out thier contents, but in the proper sequence. i.e. Massive Array (roughly 1700 internal unassigned (per chunk) arrays with 2 words each) main arr     arr 0-apple 1-apple2     arr 0-orange 1-orange2     arr 0-pear 1-pear2 echo as Apple Apple2 Orange Orange2 Pear Pear2 Thanks in advance!
  7. onlamp is now on my php blacklist. A help reference on getting values out of arrays told me to use & instead of $ when calling directly to an array value. basterds. thanks anyway s-
  8. Here is my issue (I am still green, be nice); Trying to pull values from 2 arrays based on error or changed state, i.e you just logged in, you didn't fill a form right, etc... This is going to be implimented accoss a large site with multiple dir levels so i wanted an include to handle arrays where all of the errorlevel and messagelevel information was and thier corresponding links. The issue i'm having is, I have accomplished this with 'list' but its very cumbersome and I know there is a way to compact it down to a simple $array[0] type call but i cant get it to work. here is my code, plz help. The error i am currently getting is 'Unexpected ['. thanks in advance. call_defs.php ~ <?php $statei = array(0=>'Error(s) Found.',1=>'Success!',2=>'Logging In '.$user.'.',3=>'Logging Out '.$user.'.',4=>'Welcome Administrator'); $linki = array(0=>'javascript:history.back()',1=>'console.php',2=>'login.php',3=>'../index.php'); ?> index.php ~ <?php ... if ($err<>null) { include ("call_defs.php"); $state = &statei[0]; //FAILING ON THIS LINE 'Unexpected [' $linkstate = &linki[0]; include ("call_state.php"); echo ("<META HTTP-EQUIV=Refresh CONTENT=\"5; URL=javascript:history.back(-1)\">"); exit(); ... ?> call_state.php ~ <?php echo <<<html ... // in a table blah blah blah $state //echos errorlevel $linkstate //echos appropriate link in case browser doesn't support refresh. ... html; ?>
×
×
  • 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.