I have a php file which looks like this:
<?php
$subjectshort=' vetcm';
$comparray=arra y('c1','c2','e1 ');
?>
I need to change the $comparray line so it now looks like this:
$comparray=arra y('c1','c2','e1 ','e2');
How can I do this (I would appreciate actual code if possible).
Thankyou.
4 1522
I have a php file which looks like this:
<?php
$subjectshort=' vetcm';
$comparray=arra y('c1','c2','e1 ');
?>
I need to change the $comparray line so it now looks like this:
$comparray=arra y('c1','c2','e1 ','e2');
How can I do this (I would appreciate actual code if possible).
Thankyou.
Hi,
you mean you want to add values to the array dynamically?
Hi,
you mean you want to add values to the array dynamically?
Thanks for your reply.
Um, well, yes I need this to happen via a script. The 'e1','e2' etc represent competencies, and when a user adds a competency, it needs to update this file. This file contains all the short abbreviations, and pretty much every other file in the system accesses this file to work.
Now obviously I myself can easily and quickly change this file manually, but the system is designed to be used by anyone without accessing the files directly on the server. Thus the need for the script to do it automatically.
gregerly 192
Recognized Expert New Member
Thanks for your reply.
Um, well, yes I need this to happen via a script. The 'e1','e2' etc represent competencies, and when a user adds a competency, it needs to update this file. This file contains all the short abbreviations, and pretty much every other file in the system accesses this file to work.
Now obviously I myself can easily and quickly change this file manually, but the system is designed to be used by anyone without accessing the files directly on the server. Thus the need for the script to do it automatically.
Personally, I'm thinking this is something that would be well suited for a database. Store the competencies in the DB, and pull them into your file dynamically, rather than actually writing to the file. Just a personal thing, you can probably get it to work either way, but the database option would be alot easier.
Greg
Personally, I'm thinking this is something that would be well suited for a database. Store the competencies in the DB, and pull them into your file dynamically, rather than actually writing to the file. Just a personal thing, you can probably get it to work either way, but the database option would be alot easier.
Greg
Gregerly, Thanks for your tip. You're probably right, it probably is suited for a db. But it's a 1 off thing, and I'm still wondering whether anybody out there can tell me the required code. I didn't think it would be too complicated. Perhaps I'm wrong...
Sign in to post your reply or Sign up for a free account.
Similar topics |
by: Mike Barnard |
last post by:
Hi all, newbie here.
Odd sounding subject but I can't describe it any better.
I'm trying to teach myself a little about CSS. In a test site (not
published) I am trying to use CSS to make navigation buttons. I'm
using the tutorial I found at this site as a basis for it.
http://www.mako4css.com/TFonts.htm
|
by: Daniel Lidström |
last post by:
Hi,
I would like to know the cleanest way to change the serialization of my
Line class from:
<Line staStart="2327.02" length="10.00000003390744">
<End>549016.570965 57945.741122</End>
<Start>549019.590988 57955.274194</Start>
</Line>
|
by: Don Pasquale |
last post by:
The following function intends to delete "numberoflines" lines from a text
file, named "s" (string pointer) and pointed to by file pointer "fp", starting
from line "line".
Now, the function works an inteded, but I think that this is purely
coincidential.
I'm using a temp file to copy the contents of the text file, and then, copy
the last lines that i want to keep, on top of those i want to delete.I fwrite
an EOF character after the...
|
by: sonald |
last post by:
Hi,
Can anybody tell me how to change the text delimiter in FastCSV Parser
?
By default the text delimiter is double quotes(")
I want to change it to anything else... say a pipe (|)..
can anyone please tell me how do i go about it?
|
by: W C Hull |
last post by:
We have a request from Auditing to modify the password an a local
workstation administrative account every 90 days. We are developing two
programs - a VB6 GUI program that will allow the administrative support
person to enter a new password into an App and have that encrypted password
saved in a text file. The second part is a VB6 program that only is a
command line program that will open the password text file, read the
encrypted...
| |
by: yashgt |
last post by:
Hi,
We have an application that has been deployed into a virtual folder
along with ascx, aspx and the code-behind files. It runs smoothly as
long as we don't change any code-behind file. If we change a file, we
expect ASP .NET to recompile the website when a user next accesses it.
However, on next access the user gets the following error:
Description: An error occurred during the compilation of a resource
required to service this...
|
by: st12iker |
last post by:
I have a datafile with the following format from which I need to extract parts of the text and copy to a seperate file :
Header (line 1)
---------------------------
(line 2starts)
Content - Content
Content - Content
Content - Content
|
by: J. J. Ramsey |
last post by:
In Perl, there is a module called "Tie::File". What it does is tie a
list to each line of a file. Change the list, and the file is
automatically changed, and on top of this, only the bits of the file
that need to be changed are written to disk. At least, that's the
general idea.
I was wondering if something roughly similar could be done in Python,
or at the very least, if I can avoid doing what amounts to reading the
whole file into...
|
by: =?Utf-8?B?QnJpYW4gQ29vaw==?= |
last post by:
I want to change the font color and weight at a specific position in the text.
I am not sure where or what I need to do. It will be at position 155/156
from the left on each line.
Here is the code I need to put it into.
using System;
using System.Drawing;
using System.IO;
|
by: Sevla |
last post by:
hello,
im having a problem to change a particular word in a line, can´t find where is my mistake
also i would like to know how to make this program check automatically if a particular word exists on the line you got to you exchange it or not
i didnt find the right condition to do it
|
by: Oralloy |
last post by:
Hello folks,
I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>".
The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed.
This is as boiled down as I can make it.
Here is my compilation command:
g++-12 -std=c++20 -Wnarrowing bit_field.cpp
Here is the code in...
| |
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...
|
by: Hystou |
last post by:
Overview:
Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
|
by: agi2029 |
last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own....
Now, this would greatly impact the work of software developers. The idea...
|
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...
|
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...
|
by: 6302768590 |
last post by:
Hai team
i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
| |
by: muto222 |
last post by:
How can i add a mobile payment intergratation into php mysql website.
|
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...
| |