473,835 Members | 1,836 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

in php the value keep - undefine help me pls!!

93 New Member
hi people basically I am having a problem with the followinng code:
[PHP]
$names=sizeof($ temp);
$report="total= $names&";

foreach($temp as $list)
$report.="name" .$names--."=".$list." &";


echo $report;
[/PHP]

from the above code the "total" is always undefine when I try to output it even when I put "total =3" anybody know or there is something wrong with my code pls help thx~
Jul 19 '07 #1
5 1710
code green
1,726 Recognized Expert Top Contributor
[PHP]$names=sizeof($ temp);
$report="total= $names&";
foreach($temp as $list)
$report.="name" .$names--."=".$list." &";
echo $report;[/PHP]
from the above code the "total" is always undefine
I think in this instance php is treating total as a CONSTANT and not as a string..
You have to define a CONSTANT.
This code looks a real mess. What are youu trying to achieve?
Jul 19 '07 #2
Rocky86
93 New Member
[PHP]$names=sizeof($ temp);
$report="total= $names&";
foreach($temp as $list)
$report.="name" .$names--."=".$list." &";
echo $report;[/PHP]

I think in this instance php is treating total as a CONSTANT and not as a string..
You have to define a CONSTANT.
This code looks a real mess. What are youu trying to achieve?
hi you mention I have to define a CONSTANT what do you mean ? basically I am trying to store the number of name inside the variable name total and pass it to the actionsript to output it
Jul 20 '07 #3
Atli
5,058 Recognized Expert Expert
So the output of the PHP code is being received by your Actionscript, which is unable to parse the "total=3" into a value?

There is nothing wrong with the PHP, this sounds like an actionscript problem.
Jul 20 '07 #4
Rocky86
93 New Member
So the output of the PHP code is being received by your Actionscript, which is unable to parse the "total=3" into a value?

There is nothing wrong with the PHP, this sounds like an actionscript problem.
hi can anyone explain to me what is this part of the code doing?
[PHP]
$report.="name" .$names--."=".$list." &";


[/PHP]
Jul 20 '07 #5
code green
1,726 Recognized Expert Top Contributor
can anyone explain to me what is this part of the code doing?
[PHP]$report.="name" .$names--."=".$list." &";[/PHP] It is concatenating the following string onto the current value of $report
Expand|Select|Wrap|Line Numbers
  1. the word "name" + the value of $names-- + equals sign("=") + value of $list + ampersand ("&")
Jul 20 '07 #6

Sign in to post your reply or Sign up for a free account.

Similar topics

1
5453
by: Per Magnus L?vold | last post by:
Hi, I am trying to create a package under the apps schema, and I keep getting PLS-00201 and ORA-00942 when refering to types from other apps-packages and other views / tables. I even get this error when calling a quite simple: MY_NUM := FND_PROFILE.VALUE('MY_PROFILE_NAME'); Any ideas what I can be doing wrong? This same code was originally part of a trigger code, and worked just
1
1918
by: Rafal 'Raf256' Maj | last post by:
Hi, is there a commend to undefine all macros #define inside a file? in example: #define FOR(x) for (..............) #define MyMacro1(x,y) ........... // ... code ...
2
1397
by: rayapati | last post by:
dear all, i have a doubt in c language i had declared a function as void type but it will written a value or not. pls claify these doubt. thank you.
2
2204
by: HarisHohkl | last post by:
Hi, I've this function in a class to update the total value.but when i try to remove the these row highlight in Bold it crash, what should i do???? void display_total_value() { double value; double totalvalue=0; int r, c; setcolor (11); for( r=0; r<row; r++ )
0
1482
by: prakash2kr | last post by:
i am using the following code to show popup window window.showModalDialog("WebForm2.aspx","","height=200px;width=300px"); how can i pass the value from WebForm2.aspx to parent window... i had already tried the following code it was not working
6
12377
by: Pietro Cerutti | last post by:
Hi Group, is there a mean to undefine a function, in a similar way as you can undefine macros? For example, let's say that I need a few declarations from stdio.h but want to define my own printf: #include <stdio.h> #undefine-or-similar printf #include "printf.h"
6
3432
by: Slickuser | last post by:
Hi, I am picking up C#.net and I'm trying to add many values to one single key at different time in a loop. If the key already exist, append new value to previous? I'm not sure how to do that with ArrayList, any help? Thanks. Hashtable data = new Hashtable(); if (!data.Contains(key)) {
1
4889
by: chennaibala | last post by:
can any one send me mutiple image upload program and save the file name with extension in mysql table.we must cheak uploaded file type like bmp or any image file while uploading. i develop program,which can upload many file in folder.problem is,am unable to save my file name in to database.because i used same name for all input file type as file. i dont know get name of file.below i presented my coding for ur view.fed up with my coding..pls...
2
4334
by: Kristofds | last post by:
Hi, I'm trying to call an Oracle package function from C#, but I keep getting the same error: PLS-00306: wrong number or types of arguments in call to 'F_CTCPREPAREP151HEADER'. This is the function declaration in the package: function f_CtcPrepareP151Header ( as_codjal in varchar2/*, ad_datdoc in varchar2, as_codfnr in varchar2,
0
9810
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
10524
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
0
10236
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
1
7768
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
6968
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5639
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
5805
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
2
3997
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
3092
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.