Sponsored Content
Top Forums Programming Dynamically added text fields passed to PHP script Post 302786083 by GroveTuckey on Tuesday 26th of March 2013 07:34:10 PM
Old 03-26-2013
well

Code:
$boxes,$boxes1,$boxes2,$boxes3,$boxes4,$boxes5,$boxes6,$boxes7,$boxes8,$boxes9,$boxes10,$boxes11

is other data in the form.

I feel like I am misunderstanding your suggestion.

I should have left the boxes out of the post so not to confuse the subject. I will edit the original post.
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

combining fields in two text fields

Can someone tell me how to do this using sed, awk, or any other basic shell scripting? Basically I have two text files with the following contained in each file: File A: a b c d e f g h i File B: 1 2 3 I want the final outcome to look like this: a b c 1 d e f 2 g h i 3 How... (3 Replies)
Discussion started by: shocker
3 Replies

2. Shell Programming and Scripting

Get the latest added part of a text file?

Hi, I want to get the latest added part of a text file sent over the network to for analysis. Is there a tool to use to keep track of which part of a text file that has already been analysed so only the "new" lines will be sent and handled? I have checked a few tools but I still donīt know how to... (3 Replies)
Discussion started by: pcrs
3 Replies

3. Shell Programming and Scripting

I want Trailer to be added into the text file.

Hi folks, I want Trailer to be added into the txt file the format is below. flatfile-> abc.txt count of the file is 500 records. I want the trailer in this format: TRAILER|500 (pipe delimeter). Please suggest the comands ASAP. Rgds Ann (5 Replies)
Discussion started by: Haque123
5 Replies

4. Shell Programming and Scripting

Dynamically creating text files using shell script

Hi All, I want to create a shell script which dynamically create text files. i am using the following script $i=1 while do cat > test_$i.txt done but while running the script it was stopping(the cursor not going to next step, i have to enter ctrl+c to make it stop). it is creating only... (2 Replies)
Discussion started by: KiranKumarKarre
2 Replies

5. Shell Programming and Scripting

Need to echo a text where a (.) is added to the end of line during on-going copy or ftp

Hello All, I would like to create a script to echo a text where a (.) dot is added every 2 seconds to the end of this text (with a limit of 10 dots) as long as a file copy or ftp is ongoing and once the copy is finished it adds "done" to the end of this text line. please see the below example: ... (6 Replies)
Discussion started by: Dendany83
6 Replies

6. Shell Programming and Scripting

How to create dynamically associative array in PHP?

Hi, I have an html page like this: <html> <body> <form action="test.php" method = "post"> Enter your name:<input name="search" type = "text" size ="40"> <br> Enter your age:<input name="age" type = "text" size ="20"> <input type = "submit" name="submit" value="search"> <input type =... (1 Reply)
Discussion started by: vanitham
1 Replies

7. Shell Programming and Scripting

Shell script to find the sum of argument passed to the script

I want to make a script which takes the number of argument, add those argument and gives output to the user, but I am not getting through... Script that i am using is below : #!/bin/bash sum=0 for i in $@ do sum=$sum+$1 echo $sum shift done I am executing the script as... (3 Replies)
Discussion started by: mukulverma2408
3 Replies

8. Shell Programming and Scripting

Swap of fields dynamically

Dear Friends, I have file a.txt 1|2|3|4|5|6|7|8 a|b|c|d|e|f|g|h i am using the below code to swap the fields in file awk -F\| '{print $5,$1,$2,$3,$4,$6,$7,$8}' OFS=\| a.txt > output.txt output.txt 5|1|2|3|4|6|7|8 e|a|b|c|d|f|g|h The above command is working fine. I am... (4 Replies)
Discussion started by: i150371485
4 Replies

9. UNIX for Dummies Questions & Answers

Sending mail to multiple recipient added in a text file

I am trying to find a code that can help me mail to a list of recipients which are in a text file. Sample code $cat recipient.txt me@test.com me1@test.com me2@test.com I want a mailx step that can read contents of recipient.txt and mail to all the users. I don't want to use mails... (1 Reply)
Discussion started by: Gurkamal83
1 Replies

10. Shell Programming and Scripting

Shell script to create runtime variables based on the number of parameters passed in the script

Hi All, I have a script which intends to create as many variables at runtime, as the number of parameters passed to it. The script needs to save these parameter values in the variables created and print them abc.sh ---------- export Numbr_Parms=$# export a=1 while do export... (3 Replies)
Discussion started by: dev.devil.1983
3 Replies
Tree::Simple::Visitor::FromNestedHash(3pm)		User Contributed Perl Documentation		Tree::Simple::Visitor::FromNestedHash(3pm)

NAME
Tree::Simple::Visitor::FromNestedHash - A Visitor for creating Tree::Simple objects from nested hash trees. SYNOPSIS
use Tree::Simple::Visitor::FromNestedHash; my $visitor = Tree::Simple::Visitor::FromNestedHash->new(); # given this nested hash tree my $hash_tree = { Root => { Child1 => { GrandChild1 => {}, GrandChild2 => {} }, Child2 => {} } }; # set the array tree we # are going to convert $visitor->setHashTree($hash_tree); $tree->accept($visitor); # this then creates the equivalent Tree::Simple object: # Tree::Simple->new("Root") # ->addChildren( # Tree::Simple->new("Child1") # ->addChildren( # Tree::Simple->new("GrandChild1"), # Tree::Simple->new("GrandChild2") # ), # Tree::Simple->new("Child2"), # ); DESCRIPTION
Given a tree constructed from nested hashs, this Visitor will create the equivalent Tree::Simple heirarchy. METHODS
new There are no arguments to the constructor the object will be in its default state. You can use the "setNodeFilter" methods to customize its behavior. setNodeFilter ($filter_function) This method accepts a CODE reference as its $filter_function argument and throws an exception if it is not a code reference. This code reference is used to filter the tree nodes as they are created, the $filter_function is passed the node value extracted from the hash prior to it being inserted into the tree being built. The $filter_function is expected to return the value desired for inclusion into the tree. setHashTree ($hash_tree) This method is used to set the $hash_tree that our Tree::Simple heirarchy will be constructed from. It must be in the following form: { Root => { Child1 => { GrandChild1 => {}, GrandChild2 => {} }, Child2 => {} } } Basically each key in the hash is considered a node, values are ignored unless it is a hash reference with at least one key in it, in which case it is interpreted as containing the children of the node created from the key. The tree is validated prior being accepted, if it fails validation an execption will be thrown. The rules are as follows; The hash tree must not be empty. It makes not sense to create a tree out of nothing, so it is assumed that this is a sign of something wrong. The hash tree must be a single rooted tree. The hash tree should have only one key in it's first level, if it has more than one, then it is not a single rooted tree. NOTE: Hash keys are sorted ascii-betically before being added to the tree, this results in a somewhat more predictable hierarchy. visit ($tree) This is the method that is used by Tree::Simple's "accept" method. It can also be used on its own, it requires the $tree argument to be a Tree::Simple object (or derived from a Tree::Simple object), and will throw and exception otherwise. BUGS
None that I am aware of. Of course, if you find a bug, let me know, and I will be sure to fix it. CODE COVERAGE
See the CODE COVERAGE section in Tree::Simple::VisitorFactory for more inforamtion. SEE ALSO
These Visitor classes are all subclasses of Tree::Simple::Visitor, which can be found in the Tree::Simple module, you should refer to that module for more information. AUTHOR
stevan little, <stevan@iinteractive.com> COPYRIGHT AND LICENSE
Copyright 2004, 2005 by Infinity Interactive, Inc. <http://www.iinteractive.com> This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself. perl v5.10.1 2005-07-14 Tree::Simple::Visitor::FromNestedHash(3pm)
All times are GMT -4. The time now is 07:03 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy