/    Sign up×
Community /Pin to ProfileBookmark

Help With Design

Hello forum
I need your help I have this:
<?php
mysql_data_seek($title_query, 0);

while ($title_result=mysql_fetch_array($title_query)){
$numJobs = mysql_result(mysql_query(“SELECT COUNT(*) FROM job_post WHERE JobCategory='{$title_result[‘jobcategory’]}'”), 0);
echo “”;
echo “<br><a href=”jobseekers/job-search2.php?JobCategory={$title_result[‘jobcategory’]}”>{$title_result[‘jobcategory’]} ($numJobs)</a>”;
echo ” “;
}

mysql_data_seek($title_query, 0)
?>

and result is this:

For ex.
Automative
Engineering
Hardware
Software

My question is how to make changes/design to have result in 2
Like this:
For ex.
Automative Hardware
Engineering Software

to post a comment
PHP

4 Comments(s)

Copy linkTweet thisAlerts:
@NogDogMar 03.2005 — [code=php]
<?php
mysql_data_seek($title_query, 0);
$counter = 0; # track number of links displayed
while ($title_result=mysql_fetch_array($title_query)){
$numJobs = mysql_result(mysql_query("SELECT COUNT(*) FROM job_post WHERE JobCategory='{$title_result['jobcategory']}'"), 0);
# echo ""; (this does nothing)
$br = ($counter++ % 2 == 0) ? "<br>" : ""; # if divisble by 2 use <br>
echo "$br<a href="jobseekers/job-search2.php?JobCategory={$title_result['jobcategory']}">{$title_result['jobcategory']} ($numJobs)</a>n";
# echo " "; (adding linefeed to end of previous line makes this unnecessary
}

mysql_data_seek($title_query, 0)
?>
[/code]
Copy linkTweet thisAlerts:
@dfd2000authorMar 03.2005 — WOW FAST RESPONS

Thanx is greate,is look wonderful
Copy linkTweet thisAlerts:
@dfd2000authorMar 04.2005 — for Pittimann
Copy linkTweet thisAlerts:
@PittimannMar 04.2005 — Hi!

In reply to your pm's:

wouldn't it be easier, to use something like my brother suggested [URL=http://www.webdeveloper.com/forum/showthread.php?s=&postid=296791#post296791]here[/URL]? Of course it would be possible to bake a cookie, but I think, my brother's suggestion is ok.

Cheers - Pit
×

Success!

Help @dfd2000 spread the word by sharing this article on Twitter...

Tweet This
Sign in
Forgot password?
Sign in with TwitchSign in with GithubCreate Account
about: ({
version: 0.1.9 BETA 5.18,
whats_new: community page,
up_next: more Davinci•003 tasks,
coming_soon: events calendar,
social: @webDeveloperHQ
});

legal: ({
terms: of use,
privacy: policy
});
changelog: (
version: 0.1.9,
notes: added community page

version: 0.1.8,
notes: added Davinci•003

version: 0.1.7,
notes: upvote answers to bounties

version: 0.1.6,
notes: article editor refresh
)...
recent_tips: (
tipper: @AriseFacilitySolutions09,
tipped: article
amount: 1000 SATS,

tipper: @Yussuf4331,
tipped: article
amount: 1000 SATS,

tipper: @darkwebsites540,
tipped: article
amount: 10 SATS,
)...